Can I just put my boxer gloves in a washing machine? Or can it damage them?
Definitely do NOT put them in the washing machine, that one of the top ways to ruin them.
Your best best to get them super clean and disinfected is to grab a spray bottle and mix up 1 part white vinegar to 2 parts water. Spray the outside of them and just wipe them down with a paper towel or a clean rag and do the same for the inside but make sure that you really get the insides as dry as you can. Just make sure you don’t strap them back together because you will want them to dry out as best as they can.
Keep in mind that your best bet is to always try and keep them as clean as you can. Wipe them down after your training session and keep them out of your gym bag (it’s loaded with bacteria that spreads fast throughout your personal belongings). When you are going from the gym to home or work, just carry them slung through the straps on your backpack or over your shoulder.