I am no electronics expert, but a magnet shoul be okay on you transformer. Now if it was a personal computer or something that uses magnetic tape (casette player, VCR, floppy disk drive) then your in trouble.
Will
Okay
Thanks again,
Jamie
Cape Vincent Southern Railroad
HO scale Horseshoe Curve in 5’x10’
My YouTube
No, the magnets should have no effect at all on the transformer. The metal box is only there to keep you from sticking your finger onto a 110 Volt wire and getting shocked, and to keep dirt out.