The word contraception, is a modern word. The biblical word, and the word used by Christian antiquity to describe what we moderns call contraception is Onanism. The word comes from this passage wherein Onan spills his seed on the ground and God kills him for it.,
Up until the mid 1800's the mistaken understanding of reproduction was that semen was literally a seed fully capable of generating life, and that the female was just the fertile ground. We know know that this is not true, and that neither, alone can generate life. Contraception no more destroys life than celibacy. All those sperm, and all those eggs are going to die anyway...
later in Genesis 38, Tamar prostitutes herself to Judah by the side of the road. That's some ethical foundation.
This is not the case. Although of course, lacking microscopes, the people of antiquity knew nothing of genetics and embryology, all people from the time of the herder/breeders realized that the male and the female contribute something. As early as Genesis (arguably written around the 6th century BCE) the central struggle of the Bible is encapsulated in these words(Gen 3:18) - "I will put enmity between you [the serpent] and the Woman, between your seed and her seed..." The whole subsequent story springs from this: the age-old enmity between the Evil One, and humankind, identified as "the seed of the Woman."
In ancient Greece, Aristotle believed that menstrual blood was the actual substance from which life generated. In the 1677, a student of Antonie Philips van Leeuwenhoek first observed spermatozoa in seminal fluid, and most importantly, discovered sperm in female reproductive tracts after copulation. This finding eventually led to the end of earlier preformation theories, which held that entire individual humans were present in the female egg, and that sperm acted only somehow to facilitate the release and growth of this individual.
Even as late as the 19th century, physicians still refused to consider the possibility that male factors played a role in fertility at all. It was at that time that modern embryological science began as the mammalian egg was discovered, but sperm's essential role in fertilization remained unproven until 1879.
That's not even 150 years ago.
My point here is that people could conceptually distinguish between abortion and contraception millennia earlier than you give them credit for; and Onanism would not have been seen as the same as abortion, since it involved only seminal fluid, and not a conceived child. But both abortion and contraception were seen as morally objectionable: abortion because it is an offense against the sanctity of life, and contraception because it is an offense against the sanctity of sex.
BTW, I see that you have some perplexing scruple against Tamar as a heroine. The following article should at least amuse you: concerning the 'Woman Problem' in Jesus' genealogy (Link). I'd love to know your reaction to it.