Not quite sure what the problem is about squaring - it might not be as bad as you think!

On my own machine, I bolted down one rail to the frame as straight as I could. I then used the gantry to align the second rail to it, to guarantee parallelism - just enough slack in the mounting holes using M5 (from memory) bolts to allow the second rail to move slightly, then slide the gantry back and forth to get it parallel and tighten bolts. I built the gantry as accurately square as I could, and once the machine was almost finished I could take test cuts and then adjust the gantry to be as square as I could measure from the test pieces. How to square it? Again, in my case, I was driving the gantry at both ends so I could adjust the home position at each end of the gantry so that each time it homed, it automatically re-squared itself. I had arranged the gantry itself to be bolted to "feet" at each end which carried the ball slides and during the initial squaring, I could slacken the bolts slightly to allow the gantry to swivel slightly, then tightening once I was happy. The process does rely, obviously, on having a master and slave drive to the gantry, one at each side, and the motion controller needs to support separate homing of master and slave axes.

There is an underlying design principle in all this. For a home-built machine, where you do not have the machining and assembly facilities to build accuracy immediately into the machine, you need to build in wiggle room so that once built, you can adjust everything. "Adjust on assembly" is an expensive nightmare in a commercial setting so you pay a fortune for manufacturing capability to build in accuracy. As amateurs we don't have that luxury but our time costs a lot less so we do it the hard way! But it works - witness the number of successful machines described on this forum. Good luck!