Lego 12v motor axle repair
It's difficult to answer definitively without a photo or video of the issue, but I'm not aware of a way to easily get replacement parts for this.

I'm sure you're already aware that you can buy a replacement motor on Bricklink, but that's going to set you back at least $100.

Internally, this motor drives a pair of gears on the axles using metal worm gears. One of the common issues with this part is that the metal worm gear slowly wears down the other gear until the there is a complete loss of contact and the motor spins freely without driving the train. It sounds like this may be what you are experiencing.

Here's a diagram of the internal components:



I'm not aware of a third party that provides replacement parts for this, and I'm sure that LEGO doesn't provide them anymore. One option could be to buy the somewhat cheaper black version of this motor and swap out the axles from there.