The other way to do that is start with the box section then weld 2 thick bars onto the front face, one at the top and one at the bottom. Leave enough gap in the middle to clear the ballnut. Rails can mount to these bars and you have plenty of depth for the threads. Similar outer profile to your drawing but without the discontinuities.