Had similar issue in Scotland couple of summers ago. Was with then 9 yr old son and dog. Entered field with Friesians in. Couple started taking a proper interest. Let dog go and told son not to run. We started walking for gate, they started to canter, we gently jogged. When we were within 20 yards of the gate I told him to sprint like hell! Was properly scary, particularly because I had the boy with me. Strange thing is I grew up in the country and used to being around cows (Phnaar, phnaar), but there was something menacing about this.
On way back decided to skirt field. 3-4 cows followed us on the other side of the wall. As we came to the end, I realised that the wall stopped and the cows could just come round the end and meet us. I had run like buggery, thrown the boy over the electric fence at the end and failed spectacularly to vault it cleanly (the electric shock isn’t that bad, unless you p1$$ on it which is another story) before I realised that a similar fence blocked the end of the cow’s field where the wall stopped and we were safe.
Moral of the story, approach with caution and probably not with a dog at all..
..and regardless of how much you’ve had to drink – and how much your so-called mates are egging you on – never, never answer a call of nature on an electric fence..