Out of curiosity, what does the jitter test do? Is this the time jitter writing to some port? 21us sounds like a lot, is this with a RT kernel?
It's no replacement for an FPGA, but a 600 MHz Teensy 4.x (standard clock rate) has no issue doing software quadrature encoder (interrupt driven) reading at 400 KHz, (2.5us) the HW quadrature encoder is much faster. This 2.5us rate is with the rest of my ELS code running. Very simple development, IMHO. Might not be suitable for your application, though.
Yes, I've thought of that. GRBL is an arduino project that implements G-code, it would be the easiest approach to using an embedded microcontroller. Putting that on a Nano would be an easy, open source software approach. Still need some sort of computer in front of the microcontroller to run a GUI and feed it G-code, but no more worries about real-time. It is really just controlling 3 leadscrews verses the 1 your ELS is doing.
Since the existing servos are all 10v differential signaling, any solution is going to require some I/O hardware.
Linuxcnc requires a real-time kernel, and for simplicity the standard Linuxcnc download is a full debian install with the RT kernel. The jitter test sets up a periodic interrupt and then measures the *worst case* variation from the nominal period. That worst case is a function of other interrupts that may be occuring on the system. The real time kernel can only really control linux timing, some timing associated with multiprocessors, fans/cooling, etc are handled by the BIOS and outside of the rt kernels control. 21us is considered OK, not great (10-15us) but not bad (>30us). Getting good worst-case jitter has been the challenge in using Raspberry PI based controllers. Most full-computer CPUs are optimized for performance around human timeframes, where 1ms response is more than sufficient. There are some hacks to completely remove cpu cores from the standard multiprocess scheduling (isolcpus) that may help more.
LinuxCNC appears to me much fuller featured. It implements a broader range of G-codes, and has significant graphics visualization tools. The FPGA based hardware card is already set up with voltage drivers for high voltage controls and differential signaling, in addition to the timing. Availability of hardware is a real challenge given the current chip-shortage issues, whatever approach you take.
There are versions of the FPGA card that connect via ethernet. An intriguing and popular linuxcnc configuration is to use an RPI4 with one of those cards. The FPGA card is directly connected w/o a switch for best performance.