Shaft Loctite is the cure, if the worm is not split. I fixed a pulley on a small table saw that way 40 years ago, and it is still holding. We do driver tires, and even loose driver axles with shaft Loctite.
The proper nomenclature - the thing on the motor shaft is the "worm" and the gear on the axle is the "worm gear."
I have a pair of brand new MTH SD trucks with motors - but I am going to sell them as a pair.