Put a sprocket on the axle and implement your own encoder using a photointerrupter or geartooth sensor (if using a ferrous sprocket) or make a reflective encoder by printing a codewheel pattern and gluing it to your mechanism and using a reflectance sensor.
Use some small plastic 25-pitch sprockets to attach a potentiometer or encoder (depending on the range of the device, if it is continuous an encoder, if it has a limited range, a potentiometer).
Why plastic sprockets? A sensor has almost no load, and plastic is lighter than steel or aluminum.