It is possible to change the pinion, it is finding the right tools to do the job that makes it difficult.
You would need to find a replacement pinion first off.
Then a tool similar to this one would be a great help:
The shaft on this one is 3mm so will be too big so you would have to find a supplier that has a smaller one
However if you could support the underside of the pinion you could use a small diameter pin and hammer to knock the motor shaft out.
Very fiddly, but do-able