Given the large sizes of wire you are talking about (#4 and larger), there are strict rules for junction box dimensions - and they are awkwardly large.
Your best bet is to use conduit bodies instead, which are manufactured appropriate to the conduit size. An example is an LL, LB or LR type - each one provides the access cover on a different side, and you select it based on the location.
Remember conduit body access covers must remain accessible without tools. So it is not legal to cover it up with drywall or nailed-on peg board.
While you didn't say what your project is, #4Cu is an odd size of wire. So there are two things I'd caution you of.
First, #4 copper is only good for 85 amps, and #2 aluminum is only good for 90A. See Table 310.15(B)(16). It is "folk knowledge" that those are good to 100A, but that is false and based on a wild misconception of another rule. For 100A you need #1 Al or #3 Cu.
Second, a common novice mistake is to fear aluminum. Don't. Aluminum wire is excellent for heavy feeder like this. In fact, the lugs on the panel will be made of aluminum, precisely because it is the universal donor - it plays well with both Al and CU wire. (hold that thought). What's more, we often see people polarize into their copper decision and post an "after" picture - It's a HOMeline panel, which has aluminum bus bars, for Pete's sake. Doesn't make much sense.
And lastly, the #1 panel problem seen here is "I am out of spaces in my panel". Don't economize there! Spaces are cheap. Get loads of them. Years down the road you'll want to install something else, and you won't remember the taste of the pizza you bought with the savings. And the size of a subpanel's main breaker or bus is allowed to be larger than the feeder.
What about the aluminum horror stories? This only ever applied to small wires. In the 1970s they tried scaling down the old AA-1350 alloy (used on power lines and feeder) for 15-20A small circuits. Two big problems. #1 the terminals on receptacles were made of copper or brass - WHOOPS! And thermal expansion worked against the connection instead of for it. And #2 (my theory) torque screwdrivers were not required on small connections yet, so torques were all over the map.
Improper torque makes any connection fail. But you can see where a dissimilar-metal connection will be more sensitive to correct torque. But back then, it was common practice to torque heavy feeders, and they performed well! Even in the obsolete AA-1350 alloy.