I agree with the post about bad solder joint expansion issue. Can also use a can of compressed air. The $4 stuff from wally mart most use to clean out computer keyboards. It gets very cold when used.
~ Also, I have found that there is often a tiny space of frayed wire just beyond where the solder ends and the insulation begins. That can cause a few issues, one of which being a Locomotive stopping. Too much current going through to few strands creates resistive heat. Hence causing said weak solder joint to expand and, motor and lights not getting needed current. Therefore, a stall action...
~Brushes and armatures. Absolutely must be clean. The deposits that gather just from use will stall a motor. Q-tips and naptha. Not isopropyl alcohol. It can and will melt motor winding insulation if over used. ( I learned that here. )
~Another point mentioned was where the wheels contact the electrical pickup wipers/bushings/shoes/etc. Man, that is a prime place for dirt, hairs, and all other forms of shmegma to collect. Get yourself an extra fine grit “flexi-pad” by Flexi File and after cleaning the gunk away, make those wipers shine and while you’re at it, the backs & Treads of the wheels too.
~Beyond that, all the other troubleshooting methods posted are solid advice imo that should be headed. Smart people here giving free advice, gladly. I listen to them all as if they're name is E.F. Hutton. Lol.