Many years ago we used to keep poultry behind electric mesh but stopped when we found several dead hedgehogs caught in it. Even if the first shock doesn't kill, their response on getting the shock makes them put their spines out and then they struggle to disentangle themselves, therefore receiving multiple shocks, which do kill them.