We had an electric fence at the house I lived in when I was in HS. The dog was a cocker spaniel and she never once went through the fence. She heard the beeping the first time as she approached it and never went near the edge again (the installers had strung a bright yellow cord at the location of the fence so the dog had a visual clue - string got removed after a few months). It worked great, actually. And my mom did test it out on herself and it wasn't that bad of a shock at all (lowest setting, I believe). It worked so great that my dad got the bright idea of buying more yellow string and wrapping it around our couch. He cured the dog of jumping on the couch, too!

I considered one for my last dog, but I know it would not have contained her if she really wanted out. It's just the type of dog she was...and those fences obviously work great for some, not so much for others.

We now have about an acre out in the country surrounded by farmland. Our 2 dogs have a dog door that goes out into a smaller fenced part of our yard (about the size of a suburban backyard). The rest of the property is not fenced. Our dogs know to stay in our yard (or our neighbors but the neighbors also have dogs and they all play) because they are NEVER left out alone. If they are outside the fence, it's because we are out with them. We don't leash them, but we also don't ignore them so they don't run off.

I think that if you can create a smaller fenced outside area so that they have the ability to be outside if they want, and then you let them use the rest of your property in your presence, you could avoid expensive fencing for 5 acres.