@C W Burfle Timko only offers replacements for steam locos with longitudinal Pullmor motors (773-type Hudson, Berkshire, 18006 Reading T-1, etc.) The motor he uses is tiny; I doubt it makes as much torque as the original, but it is a 5-pole DC motor suitable for use with ERR. Despite its small size, it sticks obviously out of the cab. There is no upgrade path for the great bulk of pre- and postwar steam having the "parallel plate" type motor.
@M. Mitchell Marmel this is *exactly* what Lionel did in 1979 with the 2-4-2 Columbia type train set loco, and again in 1986 with the 2-6-4. A small Mabuchi motor was installed in place of the armature and brush plate. This change was made for cost reasons and the motors they used were nothing special. (Only a very small cylindrical can motor would fit crosswise within the boiler shell.) The 2-6-4 received an additional stage of reduction gearing to make up for the lack of torque. I had one of these. When it ran, it sounded like a movie projector, and it suffered a lot from "cogging" at low speeds until it was thoroughly broken in. Frankly I would rather have a stock 2037.
@gibson man neither one of the motors / designs mentioned above works well with ERR. I've tried and so has @gunrunnerjohn, I believe. Again they are 3-pole non-skewed motors. The gear ratio and lack of a flywheel creates challenges, changes in load and back-EMF that the electronics can't overcome. My post above contains a link to a thread in which someone installed an unknown "pancake" type motor in a 2037. I'm not sure what motor was used, but if it's good quality, that might make the modified loco a candidate for ERR. My understanding is that most motors with a "pancake" form factor are designed to run at a constant speed for electric clocks, turntables, etc., so probably not ideal for a variable-speed application like electric trains.
What I have in mind is a high-quality upgrade or a replacement chassis. K-Line did a much better job upgrading a classic postwar design when they reissued the Marx 333 in 1992. I think the TCA's Al Ruocchio had input on this design. It was a whole new chassis with a high-ratio worm gear drive, that gives good control and realistic speeds. Unfortunately it lacks a flywheel, and there is absolutely no good way to add one, so the loco is not "kid-friendly." Careless use of the direction button results in a bone-jarring stop, and in extreme cases the brass worm could cut a burr into the fiber worm wheel.
Lionel tried a couple more times... around 1995 they released a 4-6-2 Pacific using a simplfied version of the old 2-6-4 superstructure. These locos had a plastic(!) chassis. An HO-sized can motor equipped with a tiny flywheel drove the last axle. I think this light-duty drivetrain survives in the later models of Thomas and Percy. The mounting points inside the boiler shell were changed to accommodate the new chassis, so it can't be retrofitted to a 2037, etc., even if you wanted to.
A more promising attempt was the 1998 Torpedo. Instead of re-using the 1668 mechanicals, the chassis was based on the 18000 scale switcher. I think there were QC bugs with the electronics, maybe even a few cases of zinc pest? and the switch to Korean production the next year killed any further applications of this mechanism. Still waiting.