They make some where you attach a device to the dog's collar, and it unlocks the door when they approach.
That being said, I grew up in an area completely surrounded by trees and every animal imaginable (squirrels, rabbits, coyotes, raccoons, opossums, deer, etc). We had a dog door (a simple plastic flap) to our barn. I saw raccoons and squirrels with nests literally 10ft from the dog door. Nothing ever came inside. The barn even had food (dog food, plus a fridge and cupboards with snacks). It was even heated during the winter. Nothing came in. I don't know the reasoning, but that little piece of plastic kept everything out.
That being said, I grew up in an area completely surrounded by trees and every animal imaginable (squirrels, rabbits, coyotes, raccoons, opossums, deer, etc). We had a dog door (a simple plastic flap) to our barn. I saw raccoons and squirrels with nests literally 10ft from the dog door. Nothing ever came inside. The barn even had food (dog food, plus a fridge and cupboards with snacks). It was even heated during the winter. Nothing came in. I don't know the reasoning, but that little piece of plastic kept everything out.