Yes, if the hum goes away when the loco moves it would be an indication that maybe a ground is not the problem . . . still, I can think of several, admittedly strange, scenarios where a poor ground (but probably not a completely open one) would cause a hmm or problems when the lco was stopped by not when the motor has been activated, but frankly, I don't
if it were me, while keeping in mind I might be going down the rwrong road, I'd check the grounds on both loco and tender first anyway. I've seen so many weird things that are fixed by checking and tightening grounds, in model trains and other stuff including my profession (electric power systems), that its Mother to me - where I always go first. Also, it is very easy to do - about the easiest diagnostic to run - just ground the thing well manually and see if the problem stops.
I can think of several, admittedly strange, scenarios where a poor ground (but probably not a completely open one) would cause a hmm or problems when the lco was stopped by not when the motor has been activated, but frankly, I don't