When a mechanical encoder is built there is a dielectric grease used . That grease can get crusty and make it act exactly like OP is experiencing.
I had a preamp and receiver that did that , I carefully opened the crimped body of the encoder , cleaned it, put it back together and problem solved. It could be an optical encoder that's bad but I think it mechanical based on the symptoms.