Strange it would drift that much. Is it just sending key presses on rotation or does it report some absolute value through an API? The former might result in ‘ticks’ being dropped, especially if it’s sending them out faster than PsychoPy is reading them (usually at the rate of the screen refresh) unless you’re using IoHub.
As a side note, I’ve used rotary encoders in the past with counter ICs to keep track of absolute position, which I then read-out using some microcontroller. These things can rotate practically forever (until the counter’s over/underflow) without drifting. Some microcontrollers like the ATmega32U4 (arduino leonardo) can emulate a joystick/mouse/keyboard so you can potentially make something similar which keeps track of rotation externally and feeds back the absolute position from zero as a joystick deflection.