You could rig your electric fence with a switch. It does not have to be dangerous. You turn it on when you close up the coop at night. You turn it off when you come to let them out. Or however you like. You could use a light sensor switch and be real fancy.