I think you'll find that if the encoder works at all, you don't need to be concerned with it being a little dodgy or imprecise. Mill spindles generally don't need to be positioned quite as accurately as rotary axes for useable rigid tapping or ATC alignment.
Another thing... shaft encoders come in fairly 'standard' sizes, so it's not too hard to find pre-fabricated mounts. Have a look around if you find you need something fiddly to mount to the head and you might find something online that'll save you some time.