Wiper motor PID control - pot problem

Hello everyone. I have built this project here:

It works reasonably well, but there is a rather annoying problem with the pot mounting procedure described in that page. Frankly, I cannot find the right parts to make it work in an ideal manner.

As you can see from the pictures I have drilled a hole through both the removable and screwed plates so that I can fit the pot's shaft. Beneath the screwed plate, you get access to the gear, it's a flat surface. I have somehow managed to hotglue the pot's tip on the surface of the gear as I have hotglued the shafts base on the external plate. So the only thing that is rotating is the shaft, rotating along with the gear.

Now the problem is that this is a very bad setup for unexpected errors or otherwise. If you were for example to raise the P term of the PID to demonstrate an instability state, the glue would break off the shaft's tip (as happened in these pictures). Another problem is that I have to limit the pot's potential rotation angle, using a software limitation which has proven inconsistent and not desirable.

I was wondering if one could suggest a better solution to this? I was thinking if there is a pot with specs describe in the project's page (Rotary pot, 47kohm, linear scale) that would do better in this case. In the local stores, they only sell this specific one.

Any help is appreciated.