It would be better to have the rack wrap around the cap, and probably easier.
A solid flat bar sandwiched between the bed and the cap with uprights welded to it going up to the cross rails.
Since you are talking about overlanding, the rack needs to beefed up compared to a standard on the road rack.
For a point of reference, the reenforced caps I have with mounts for roof rails call for the weight it can carry being reduced by 1/3, for the one with rails that run the length of the cap to mount the cross rails, to 1/2 for the one that just has landing pads to mount the rails.
Also, part of the reason I suggest a wrap around rather than reenforcing the cap is that a cap not designed to hold a load, with crack at the corners of the hatch opening. It might not happen immediately, but it will eventually. So, unless you build and entire cage in the interior of the cap to hold the load, the cap won't support it long term. Plus, it will be more difficult to build a cage inside compared to one that wraps around the outside. And you can add panels to hold other gear on an external rack that you can't on an interior one.
EDIT: To Curious Hound's point, make at least some of it bolt together so it is easier to get it mounted around the cap. And it will make it easier to to remove the capthan trying to slide it out from under the rack.