Glad to hear of the progress you are making in getting your trains running properly.
OK, now to your current issues. You have cleaned the track, now take them apart and make sure all the track pins are clean and not dirty or corroded. Clean or replace them if necessary. Slightly bend all the track pins so they are a tight fit when assembled. Try your locomotive now and see if it runs properly.
If it does not run well, then turn the locomotive upside down, and apply power from the transformer directly to the center pickup roller and a wheel. The locomotive should run steady in one direction, and the headlight should not flicker. If it stops or tries to reverse, you may have a bad reverse board in it.
Apply power directly to the tender roller pickup and a wheel, and try the whistle. It should blow steady, and work consistently. If not, the whistle board may be defective.
The transformer is pretty hardy, and I would do the above checks before suspecting it to be faulty.
Larry