When I set up my ESS/Gecko540/Mach4 system last year I purchased a cable from Soigeneris - you need to go from a 26pin header (ESS) to a DB26 (G540). I don't see the cable on their website, but give them a call (apparently they changed webhosting and are still populating). The cable they provided had a female DB26, and I also needed a 26 pin gender changer (male-male) since the G540 also has a female DB26. Could not find a 26pin header to DB26 male anywhere at the time.
https://www.soigeneris.com/You will have 4 available inputs and 2 outputs on G540. You will also have 2 full parallel ports worth of pins available on the ESS (it simulates 3 parallel ports!). So lots of I/O possibilities, depending on how they are configured in the ESS.
As far as MPGs go, check what you get carefully, most of the inexpensive ones are Mach3 only and do NOT work with Mach4. I think VistaCNC makes some for Mach4.
Some here are using the ShuttlePro, see the Mach4 Plugins forum here.
I got one of the cheap XHC HB04 mach3 MPGs working with Mach4 using a driver posted by mkullman here:
https://www.machsupport.com/forum/index.php/topic,31332.0.htmlOn my MPG the DROs do not read correctly, but all the movement functions work, and that is all I needed.