As a reproductive woman's health specialist, I have always wondered about this question. Women in ancient times went through some horrific and catastrophic events, and needed control over their fertility especially in times of war, famine, natural disasters, and personal atrocities. I did some digging online and found that indeed many scientists believe that women in ancient civilizations most likely did have methods they used to prevent unwanted pregnancy and births.
If you travel through Japan, you may come across a Jizo bodhisattva garden. The Jizo is sometimes referred to as a saint. He is a figure who protects the spirits of children who have died early in life as well as the unborn who have been either miscarried, or aborted in times of duress. Women of that community will often adorn the Jizo with bibs, hats and other offerings. This tradition offers closure to women who have lost children or could not give birth due to difficult circumstances.