If you have a mill then things are much easier. Are you going to weld this all together then skim flat?

If this is a fabrication then I would add a horizontal web inside the section joining front and rear faces. Easiest way would be to mill short occasional slots in the front and rear face plates and puddle weld down onto the edge of the web. Maybe even add 2 webs close in line with the unsupported edge of the extrusions. This makes several smaller boxes and will tie the extrusions into the section and reduce resonance. Some people fill open sections with all sorts of stuff but I would prefer adding a few webs (before considering filling).

Commercial machines I've seen using box section gantry are steel with thick walls. They sometimes weld 2 thick strips to the front face, skim them, and mount the rails to those. The drive is often on the top face, or sometimes they squeeze it on the front face as well.

For the end pieces you could go with RHS section trimmed into a triangle shape. Then crop the extrusions flush with the fabrication, butt up the triangular fabrication and insert short extrusion pieces inside the triangles so that when you bolt right through it will prevent them crushing and allow you to torque the bolts. See my mk3 build to see how I did it.