This is good advice from another analog user, Gary, scudding over Terror Trestle:
I have charged a chunk of money several times to a restaurant whose
staff and management believe WD-40 fixes their G-Scale trains. While I
like earning money, it was a hot, irritatingly tedious, and muscle
aching job to clean 800 feet of track by hand to remove the sticky
residue of WD-40. LGB’s Track Cleaning loco could not remove the gummy
stuff. To get the track cleaning loco to even move I had to hand clean
a two foot section of track. The loco moved forward and cleaned track
for a short distance before stalling because the cleaning disks were
quickly over loaded with gummy residue, which caused loss of
conduction of track power to the locomotive.
WD-40 solvents evaporate and leave a sticky residual that is sort of
like gum stuck to track, sliders, and wheels. Track powered trains do
not pick up electricity from gummy rails. Cleaning the rails required
using non-flammable solvent soaked bug remover towels sold in car
parts stores (not a good idea to use flammable solvents where food is
served and/or open flames are used to cook). I expect even battery
powered trains would get a bit sticky and balky if WD-40 was wiped on
rails. Kerosene or lamp oil would work much better I expect.
Just for the record: Rubbing Alcohol applied to aluminum track
gradually builds up an insulating layer. Our club layout suffered from
balky engines for years before I read about this problem in Garden
Railways. When we cleaned the track and applied a tiny bit of Rail Zip
to joiners, our engines ran great on our original aluminum track
layout.
Linseed oil or other varnishes used to coat windings on electric
motors might coat the track better. I made the mistake of applying old
linseed oil one time to wood and it remained sticky for months before
I finally striped it off and applied new linseed oil with excellent
results. I do not know what happens to old oil based paint that makes
it not properly harden, but it is a pain to deal with.