dbclass50 is right to say there is no single best way.
The Trix loco wheel cleaner is about as convenient and easy to use as one will ever find for 'little and often' cleaning, but it's nowhere near as effective as careful use of a suitable small blade for heavy encrustations and is, of course, completely useless for non-powered wheels, on a loco or any other vehicle!
For track, I have always used a vacuum cleaner first, followed by hand-rubbing with rough lint free cloth with or without almost any light solvent, followed by another vacuuming. But I have never tried track rubbers - I will one day, as they get a good press here and elsewhere. In N-Gauge, I have the cutest little Fleischmann Edelweiss track cleaning 0-6-0 loco that uses powered emery pads over each rail in place of the the centre wheels. It's almost completely useless! The little pads clog in no time at all and it's noisy as bedamned - a gimmick best forgotten imo.
I have three non-technical tips that cost nothing at all.
1. Always clean all the wheels of all vehicles and clean all track at the same time when the urge or need to clean strikes. Not doing so just results in gunge being transferred to the clean parts by the still dirty parts - altogether pointless.
2. As in most tedious but not highly skilled tasks (torture!), try to enlist helping hands. If you can pursuade 4 people into rubbing rails on a large layout, it can make an enormous difference to the time it takes. No single individual has too much work to do and affectionate complaining and cursing between a bunch of friends always helps to pass the time quicker anyway! VERY highly recommended!
3. Do it little and often - try not to let the muck and gunge bring your operations to a standstill before cleaning up.