The ribbon cables look OK.
But your motor configuration is a bit mixed up.
(a) The image of the ESS I/O Configuration dialog shows the motor step/dir assigned to port 2. This needs to be port 1.
(b) You also have Pin2 mapped to Motor0 step, where that needs to be Motor0 Dir. I know you mentioned that you swapped the step/dir and it didn't work either way. That is because of (a) above.
(c) In the ESS I/O config dialog, you have pins 2&3 going to Motor0/X axis, but in the Mach4 "Axis Mapping" dialog, you have Motor1 mapped to X and Motor0 mapped to Y. I am not very familiar with the ESS configuration, and it may be that the "Custom Name" field had no meaning or function beyond a user-readable label for the signal. However, for your later sanity I suggest that these should be consistent. If you really want Motor1 mapped to the X axis as shown in the Mach4 dialog, then change the "Custom Name" entries in the ESS config to match that. If you really want Motor0 mapped to the X axis as indicated in the ESS config dialog, then change the Mach4 axis mapping to match.
(d) Further complicating this is the PMDX-134 calls the 4 motors "Axis #1" through "Axis #4".
The main question is which motor driver on the PMDX-134 is controlling the X axis? If it is the driver in the "Axis #1" position, then the X axis must be driven by Port1 Pin2 (dir) and Pin3 (step), and the Y axis by Port1 Pin4 (dir) and Pin5 (step). If the driver in the "Axis #2" position on the PMDX-134 is driving the X axis (not logical to me, but it isn't my machine, so whatever makes sense to you), then the X axis must be driven by Port1 Pin4 (dir) and Pin5 (step), with the Y axis driven by Port1 Pin2 (dir) and Pin3 (step)
So to summarize all the changes, and presuming that the X axis is driven from the PMDX-134 "Axis #1" driver:
(1) In the ESS I/O config, disable and un-map Port 2 pins 2 through 5
(2) In the ESS I/O config, enable Port 1 pins 2 through 5 and map as follows:
Port1-Pin2 "Motor0 Dir" "X Dir"
Port1-Pin3 "Motor0 Step" "X Step"
Port1-Pin4 "Motor1 Dir" "Y Dir"
Port1-Pin5 "Motor1 Step" "Y Step"
(3) In the Mach4 config, "Axis Mapping" tab, map Motor0 to the X axis and Moto1 to the Y axis (the opposite of what is shown in the picture).
The makes the lowest motor number (Motor0) the the lowest numbered position on the PMDX-134 (Axis #1). It also maps Motor0 to the lowest lettered axis (X).
Consistency is the key to being able to figure out your configuration months or even years from now if you need to change it or replicate it. Keeping Motor0 mapped to the PMDX-134 Axis #1, Motor1 mapped to PMDX-134 Axis #2, etc. will help save your sanity. You can map them to X, Y, Z as you see fit, though again, if possible, Motor0=X, Motor1=Y is the most straight forward.
Bob