dedicate a small mcu like an ATTINY85 ... just to read the rotation.
The right choice... ESP32's underlaying OS / layer (underneath Espruino) to connect to HW interrupts is what's messing with you - my wild guess. R is not always real (Time), especially when the application is not implemented within it.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
@ungryforcodes
The right choice... ESP32's underlaying OS / layer (underneath Espruino) to connect to HW interrupts is what's messing with you - my wild guess. R is not always real (Time), especially when the application is not implemented within it.