How do I replace the Shaft?
You’ll need: ?? allen wrench, possibly a // socket driver and maybe a hammer
These instructions are valid for all upright model glass washers with motor mounted above water.
The set screws around the bottom of the motor where it meets the stand pipe need to be removed using a XX allen or xx open end wrench. Once this is done you can remove the motor from the stand pipe. If the motor is difficult to remove you can coax it by using a hammer on the underside of the motor hitting it gently along the bottom edge to loosen it.
Pic of coupler, shaft, motor assembly

Replace the motor by slipping the Shaft down the stand pipe and through the Bearings. Slip bottom collar of motor over stand pipe and push down on motor until completely seated. Turn the machine on its side and check to see how far the shaft protrudes through the bottom bearing. It should be completely through but by no more then 1/8 inch. If you need to adjust the shaft, remove the motor and adjust the coupler position on the motor shaft. Tighten set screws on the motor.
Cause or how do I avoid this problem from repeating?
Using a quality recommended low foam bar glass cleaner is the most effective way to avoid wear and get the best results. Using the wrong Brushes for your glassware, pushing down hard on the brushes and washing pictures on the washer is detrimental to your machine and will cause premature wear.