The other answer is correct, although I have a different approach. This may be different because of a feature update since the last answer was posted.
When you freeze fertilized eggs for long enough, the fertilization stops (permanently); thus making the egg unfertilized again (functionally speaking! it's still classified as a fertilized egg)
I've experimented with segregating the animals, but I've stumbled upon issues with food distribution. It's near impossible to make sure all animal areas have a separate feeding area (all of them containing food at all times) unless you have an abundance of animal food.
Bundling the food in a single feeding spot means that all animals can meet (and procreate) there.
So here's my current approach:
- Animals are not segregated by gender. Eggs can be fertilized.
- All of my cooking bills allow fertilized eggs to be used.
- I tend to always have someone whose main job is hauling, so all food is collected into the freezer ASAP. This prevents spoilage and also durability damage from being outside. It also ensures that fertilized eggs stop hatching as soon as possible.
- In case you don't have a dedicated hauler, and it's possible that the eggs hatch before they get hauled: Make a special cooking bill (top priority) that cooks fine meals only using fertilized eggs and veggies (or if you lack veggies: simple meals using only fertilized eggs). This is set to cook forever. Your cooks will now use fertilized eggs for cooking before anything else.
- Chickens lay eggs in the morning, usually before anyone is up. If I want any of them to hatch, I simply forbid the eggs from being hauled. I find that the low amount of fert. eggs that you do want to keep can easily be micromanaged. It's not like you'll keep several eggs every day, right?
- Eggs decay while outside. However, for normal weather conditions, they hatch faster than they decay. This might not hold true for excessive heat or rain. But I keep my animals inside most of the time anyway so the eggs are protected.
So instead of avoiding overfertilization, simply change your setup so that fertilization is irrelevant (because the freezer spoils the fertilization process and the cooks use the eggs with high priority) and manually decide to keep fertilized eggs.