Some time ago I made a rotary encoder unit:
Biggest issue with this approach (as is mentioned in the post) is that I have to create a “serial bridge” on my PC to forward the serial data from the encoder unit to the Snapmaker. The Snapmaker will not initiate a serial connection on its own, and the board I used to make it (RPi Pico I think) did not have a USB host capabilities at the time, it could only act as a USB device.
With the right microcontroller it should be possible to initiate a serial connection over USB. Not sure if Arduino will work though, from a quick glance at the Arduino website you’ll need either an Arduino Due board or a USB host shield.