In the UK, the big problem is foxes. We have an electric fence and automated coop door closer now. We also have a guy that enjoys shooting and roams the fields round our house shooting them.
https://www.amazon.com/Automatic-Chicken-Coop-Door-Standard/...
It has a solar panel and rechargeable battery and you program in your lat/long and optional + or - times for the door to remain open or close around sunrise and sunset.
It works well. Of course, you could hack something up with a micro-controller to do the same thing rather easily.