I recall the mentally handicapped son of a local farmer doing that in my childhood, he ended up hospitalized. If you walked away, consider yourself lucky.
Yes there was a Ren and Stimpy song, “Don’t Pee on the Electric Fence”.
As a ex-farmboy I learned early not to ever tinkle on one.
An old farmer in our area hooked his fence wire directly to the electric socket with an extension cord. The bull got his chain caught in it and it killed him.
We’ve done the same years ago with squirrels at the bird feeder. Hair burning sure stinks, but they keep coming back minutes later, burnt hair and all.