Emmet,

What is normally done is to make the back of your actual pocketing longer than the front.

When you insert your pocketing (the piece of fabric that forms the actual pocket) you sew the front or outer part directly to the outer layer of fabric. Then you create and sew on your welts or piping to cover the raw fabric edges, top and bottom.

Then there is a longer, back side to your pocket which you bring up, inside the garment, all the way to the waistband. You anchor the back of the pocketing when you sew on your waistband.

This supports the entire pocket from the waistband. The opening of the pocket should now not gape open when full.

Take a look inside a pair of good trousers that have double welt back pockets to get an idea of how this is done.