Some use electric as much to protect the permanent fence as to keep the pigs in.
Whatever the scenario, daily checking and moving soil heaps and other stuff which covers the wire is a must, or you are just training them to keep testing the fence! Lol.
A pig that *really* wants to be the other side of electric may well decide to take the hit...
One of my early WWOOFs, we arrived at the pig area one day to find the boar (whose name I have forgotten but let's call him Henry) had smashed through his electric fence to get to Henrietta's paddock. Fearing the worst (can't remember why they didn't want Henrietta bred yet, or maybe Henry was her brother or something), off we set to investigate. Turned out it wasn't sex, and it wasn't food, it wasn't even company. Henrietta had a fabulous wallow in her paddock, and Henry wanted a soak.