Always empty out the hockey bag when you get home, keeping it in the trunk of the car or closed up keeps the moisture and warm air in the bag, and the sweat begins to allow the bacteria to multiply and the bacteria causes the odor.
When possible use a drying rack to allow all of the pieces of equipment the ability to be well ventilated and dry out.
Spray the hockey items with a 100% white vinegar solution (5% acidity) to kill bacteria. If you hate the smell of white vinegar, then the Butler trick is to add one or two drops of Essential Oil to the vinegar and you can change the smell to anything you want, i.e. lemon verbena or lavender etc.
Wash the garments as often as possible, some of the padding may need to be pulled out, but it needs to be washed. Follow directions, ideally hot soapy water to disinfect the garment. Ideal time to teach kids to do their own laundry and be responsible.
Wipe down all plastic parts with a vinegar cloth to kill bacteria
Don't forget to wash the bag itself regularly if possible
Do not repack the bag until you need to use the items
Keep a fabric softner sheet (s) in the bag, this is great with keeping the smell in control
If you can't do all of this above yourself, there are cleaning services that will do this for you! Drop off the bag, they wash, and clean and return it to you. These companies often have notices at hockey rinks etc. They specialize in this kind of cleaning.
Always wear fresh, clean undergarments under your hockey gear. If you are on the road and traveling, don't re-use your undergarments, bring fresh, clean items. The use of clean undergarments help absorb sweat and doesn't put the "old sweat from a previous game" back on the hockey gear!