Yes, that should work. There is a cpu_map.h file that maps the pins to the features. It is far more flexible AVR Grbl due to the flexibility of the ESP32 I/O.
I would map the Z labeled driver to X, one of the Y labeled drivers for Y and use the two X labeled drivers for Z.
currently the cpu_map section looks like this.
#define USE_GANGED_AXES // allow two motors on an axis#define X_STEP_PIN GPIO_NUM_12
#define X_STEP_B_PIN GPIO_NUM_22 // ganged motor
#define X_AXIS_SQUARING // enable squaring for this axis during homing#define Y_STEP_PIN GPIO_NUM_14
#define Y_STEP_B_PIN GPIO_NUM_21 // ganged motor
#define Y_AXIS_SQUARING // enable squaring for this axis during homing#define Z_STEP_PIN GPIO_NUM_27
#define X_DIRECTION_PIN GPIO_NUM_26
#define Y_DIRECTION_PIN GPIO_NUM_25
#define Z_DIRECTION_PIN GPIO_NUM_33
It would change to this.
#define USE_GANGED_AXES // allow two motors on an axis#define X_STEP_PIN GPIO_NUM_27
#define Y_STEP_PIN GPIO_NUM_14
#define Z_STEP_PIN GPIO_NUM_12
#define Z_STEP_B_PIN GPIO_NUM_22 // ganged motor
#define Z_AXIS_SQUARING // enable squaring for this axis during homing#define X_DIRECTION_PIN GPIO_NUM_33
#define Y_DIRECTION_PIN GPIO_NUM_25
#define Z_DIRECTION_PIN GPIO_NUM_26
The pins for the home switches would change too, but you get the idea.