XY movement corrections for nonparallel dual gantry machine

I am currently working on a machine with two gantries. However, getting both gantries perfectly parallel will be very hard, so I am looking for some alternatives. The idea was to correct the nonparallelism by altering the motion equations, i.e. the motors will correct any movement error resulting from the nonparallelism. In fact, I'd need a linear correction along the whole axis, as shown in the following figure:
In order for tool 2 to carry out the exact same path ΔX as tool 1, it will need to carry out two correction movements ΔXc and ΔYc (where ΔXc > ΔX). Note that for better readability I exaggerated both with the nonparallelism and the size of the vectors. Imagine the vectors infinitesimal small (or as small as the microstepping allows it).
Is there a way to do this with the Duet3 and where in the config.g would I add these corrections? I have read about the IDEX calibration process which is similar but not the same since both tool sit on the same rail and you only need an offset correction.

Best to find a way to make the two gantries parallel.
Frederick

I wonder if this would work: https://duet3d.dozuki.com/Wiki/Gcode#Section_M556_Axis_skew_compensation
It doesn't seem like it's set up to use extra axes, but perhaps?