I’ve talked before about replacing a power cord on a transformer, but for whatever reason, I forgot to mention a cheap source of replacement power cords that also provide a safety improvement.
Use a 3-prong computer power cord.
Start by cutting off the plug at the end of the cord that plugged into the computer. Cut back a couple of inches of insulation, then strip back between 1/4 and 1/2 inch of wire.
To make things easier I recommend you leave as much of the existing cord as you can safely leave, then temporarily splice the computer power cord to the old cord and phase it with your other transformers. If you get the polarity wrong, switch the two hot wires on your grounded plug. Mark which wire is which.
After that, open the transformer, find where the old cord attaches to the transformer cord, mark which wire went where, then de-solder the old cord, and solder the new cord in, matching the new hot wires with the old equivalents. Next, attach the ground wire to a convenient spot on the metal case. You may want to scrape away some paint and solder the wire there, if you have a hot enough iron, or drill a hole and attach the wire with a nut and a short machine screw.
The grounded plug improves safety by protecting you from internal shorts inside the transformer. If anything ever goes catastrophically wrong and shorts against the metal case, the transformer will blow a breaker, rather than energizing the case and creating a potentially hazardous situation. The likelihood of an internal short is low but not zero, and surplus computer power cords are cheap and easy to find. If you ask one of your IT people at work nicely enough, they’ll probably give you one or two.