Automated chicken door isn't too difficult; remember the goal is to
allow them to come in or out, not to
make them do so or wake them up, though they do get conditioned to the door opening.
I made mine to open at actual sunrise (except in the summer; I keep them in until 7am because the coop is cooler, and if let out they can get loud before my neighbors wake up) and close it at actual sunset (not civil twilight, which most people think of when you say "sunset"). Generally the door is open well after the birds are in bed, which is fine.
Aside from some dumb birds when they were younger, I've never had one locked out (and those dumb ones were trying to nest in silly places, and weren't going you come in no matter when I closed the door).