4-5mm is a pretty standard depth for the top of a control cavity. It's certainly the depth you'd have if you had a ply-topped guitar. With long-shaft pots you can go deeper if you want, but 5mm will suit medium-shaft pots. Short-shaft pots are really only for direct scratchplate mounting.
If you're worried about strength, some makers countersink the pots slightly into the 'underside' of the top of the control cavity (it would be nice if there was a single word to describe it) so that it's a bit thicker everywhere else.