We had one. We have a real chain link fence and our dogs would somehow find a way out of the yard. I had to watch them once just to see how they did it. It turns out they just ran full speed at the bottom of the fence and popped through.
Anyway, after chasing the dogs around the neighborhood a few dozen times, we got the electric fence out of desperation. It worked wonders. The dogs didn’t want to go outside at all and pissed all over the floor instead. If we forced them outside they huddled on the porch and refused to do their business.
Once we got past that little hurdle (which took about 2 weeks) it was great. The dogs did finally figure out where they could and couldn’t go. They would go right to the limit where their collars wouldn’t beep and would sit there, barking at the neighbor dogs.
Since we already had a chain link fence, we didn’t have to do the whole flag thing to train the dogs where they could and couldn’t go.
The thing broke a couple of years ago. One of our dogs unfortunately got sick and died. The other dog is still with us, and still won’t go anywhere near the fence.
One important note - make sure you have a “safe” way in and out of the yard. In our case, the “safe” path was through the garage. If you don’t have one of these and you need to get the dog back into the yard you are going to have a heck of a time getting it to go near the electronic fence area.
Two of my neighbors have electronic fences and they work great. One has little mop heads (he claims that they are shih-tzus but he can’t fool me - they came from the mop store) but the other has a very large dog. You’d think that the large dog would be trouble, especially since it likes to bark at anyone who comes down the street, but it runs right to the edge of where the electronic fence must be installed and stops every time. It even chases cars, running up and down the yard but stopping as if there were a real fence there.
I do know of one case where the electronic fence didn’t work. The guy owns a dog that is literally an escape artist. He put up a fence, the dog went over it. He put up a taller fence, the dog went under it. He staked down the entire fence and the dog figured out how to open the gate. He got an electronic fence, and the dog figured out that if it sat just at the edge where the collar started beeping that he could kill the battery, and then the shock collar didn’t work and he could escape again. The dog escaped once and was picked up by animal control. They were going to fine the owner, but the dog managed to escape from animal control before the guy could pick it up. After that the folks at animal control had some sympathy.