My friend installed an underground thing. It comes with the collar and when the dog has the collor on and goes past that line it shocks them. But if you have more than one dog it will be very expensive.
I would not fence in 5 whole acres unless your willing to build a fence or spend over 12,000 buying all these underground shocking syemtems.
Get one or two dog lots depending on the number of dogs you have.
Good Luck, I hoped this helped!

I wouldn’t fence the entire 5 acres. Just fence in a smaller lot, like a good sized back yard. The trick to keep them from digging is to put chicken wire along the bottom of the fence and the ground all the way around. Dogs can’t dig out of it. Hopefully you do not have climbers.