It doesn't seem to me like you are getting a reliable reading, do you agree? Analog filtering (i.e.: capacitors) could be added to the encoder board and that may work as a debouncer and solve part of the issue. The example as it is now is reading it "very fast" already, so, I am not sure the PCB as it is now would work fine even on an Arduino, but if you have one around, it's worth trying it out. Even if it was to work with one encoder board on Arduino, I doubt you'd be able to scale it up to several boards without setting up interrupts on the MCP23017 and using extra lines for that (and assuming you won't be turning several encoders at once).