At my old house, we had the top of the fence wired to the mains, and had no escapees..... the jolt it gave you was I am sure, worse that the battery operated fence!!
I remember one day, ny hubby and a neighbour were trimming the goats hooves in the corner of the field. Heidi the large BS, and she was LARGE, gave the men a shove. They and the goat they were holding fell against the fence, Alan the neighbour held the fence for support ....eeekkk......he got a blast. The worst of it was, he was holding the goats collar, and Rick was working at the hoof, so all of them including the goat felt the force of the electric!!
I had quite a giggle watching them all squeal and shout (including Heidi)