The Egyptians had their own ways and means of getting around the fact that sex produced children. They had both contraceptives and abortions, mostly these were prescriptions that were filled with unpleasant ingredients such as crocodile dung. Here is one of the nicer ones:
Prescription to make a woman cease to become pregnant for one, two or three years: Grind together finely a measure of acacia dates with some honey. Moisten seed-wool with the mixture and insert it in the vagina.
-- Ebers Medical Papyrus