Lots of people used to suggest WD40 but in the last 20 years that seems to have changed. I do not use it any more for anything. There are many other superior products you can use for cleaning/polishing AND there are much better oils you can use for lubrication needs. I have at times heard of engineering type reasons as to why WD 40 is not an ideal product for our use, but they escape me currently.
For electrical it's bad because it does not dry and thus picks dirt up and then gums. The tube stereo guys swear by other products that clean (DeoxiT it or something similar) and at the same time those products dry with no residue. so contacts stay clean and less likely to grow gunk with use. They also have products that do provide a production to the surface.
The most interesting thing I used to see mentioned was a dirty rag soaked with Liquified Lionel smoke pellet residue. That was supposedly a great product that would lift or pull dirt and debris out of old Lionel paint. Wives tail or not I have no idea, never tried it lol.
One last comment, I do believe the prewar Lionel instruction booklets did suggest to use a good auto wax on the tinplate trains so we are on the right track especially with modern products such as Meguiar's.
Edit, attached the Deoxit spec sheet which you can find on line, but it tells ingredients etc.