You could put up 2x4 wire fencing on T-posts with insulators on the outside of the posts for electric wire. I'd position the hot wires at 6", 12" and 18" and charge them with a good fence charger. I use a 10,000 volt/1.2 Joule output charger on 42" high poultry netting. For a more permanent and sturdy fence you could sink wood posts on the corners.
The chickens don't fly out of the 42" high fence because they prefer to fly up to a solid surface then fly over. There is no solid surface atop netting or wire fencing. You wouldn't have to put up a 5' high fence. The gate, usually framed out in wood, on the other hand should be high as that is a common escape route.
I have found my electrified netting to be an excellent deterrent to ground predators. I also have a large run with a solid roof and a huge old style quince bush in the pen with other plantings that give the birds aerial predator cover and two roosters to sound alerts. I've had no losses to aerial predators and one known strike by a red-tailed hawk. No one was injured due to the availability of cover.