Most of the advice seems to be saying to build your own optical encoder. The easiest thing would be to install a commercial optical encoder directly on the rotating shaft, but apparently that is not an option.
This type of measurement can be improved by implementing a "mechanical observer" digitally using a microcontroller. You would want to get as many counts per revolution as possible, and feed the number of counts into the mechanical observer equations. The mechanical observer equations would provide position, speed and accelleration with good accuracy and low noise. Often people try to directly calculate the first and second derivative numerically from the encoder data, but this results in noisy measurements that must be filtered. The mechanical observer approach tends to give better results since it uses feedback to track the position, speed and accelleration measurement.
Note that mechanical observers can be improved if more information is available. For example if the rotational inertia is known and some real-time estimation of accelleration or breaking torques are available, the equations can include these effects.
The mechanical observer equations are relatively simple. If your research leads you to go down that path of using optical encoding and a microcontroller, just let us know and we can guide you further.