The hum is banished!
This problem was a bear to diagnose, and Hugh and I had been struggling with this almost constantly for 2 weeks. In the end, the problem turned out to be simple.
The root of my problem: a wooden enclosure. A metal enclosure has unavoidable contact with various things like ...
Happy to see your problem is solved. But it seems the cause is not really identified.
If it's a grounding problem, the metal enclosure will not help. Grounding problem should be solved by proper grounding
A metal enclosure is for shielding external interferences, not internal, not grounding loop. If your room or your system setup has no serious interferences, you can get away from hum with a wooden enclosure, as some builders do.
You might have accidentally solved the real grounding problem while changing your enclosure as the wiring plan or/and layout had been changed somehow from one enclosure to the other.
If your room and system setup (floating metal enclosures that emit interferences) have strong interferences, a grounded metal enclosure can help shield them from intruding your component.
PS. AC cabling makes obvious effects on hum in some cases. The wiring plans of AC cables before and after the components in the chain can cause hum as well, due to external loops. In particular, I found the sources, like CD/DVD players, have much to do to cause hum of this type, as these days, most of their enclosures using 2 core power cables are not grounded and their own internal grounding plans do not take into considerations of how the input and output are connected to other components' circuitry. ( by lazy engineers or hardworking engineers under deadline or cost pressures). (In this case, the metal enclosure may work as a inteference relay as well to polute the environment electromagnetically.) If an external ground loop is the problem, swapping the AC connector's polarity can reduce or kill the hum (swap it at the 8-shaped socket of the CD players or any source components.) Swapping the hot and cold wires connecting to the transformers in your own component can help too, in some cases.