You can use Hall effect sensors to sense chainwheel teeth. Two sensors and you can get quadrature and direction. I've done that on a mobile robot. With analog-output Hall effect sensors and some processing, you can get sub-degree precision, although 0.05 degree is asking a lot.