Onan has nothing to do with "all forms of contraction" - he spilled his "seed" because he did not want to give his deceased brothers wife a child.
Gen 38:8 And Judah said unto Onan, Go in unto thy brother's wife, and marry her, and raise up seed to thy brother.
Gen 38:9 And Onan knew that the seed should not be his; and it came to pass, when he went in unto his brother's wife, that he spilled it on the ground,
lest that he should give seed to his brother.
Gen 38:10 And the thing which he did displeased the LORD: wherefore he slew him also.
The above practice of "raising up seed to a dead brother" became the basis for Levirate Marriage as spelled out in:
Deu 25:5 If brethren dwell together, and one of them die, and have no child, the wife of the dead shall not marry without unto a stranger: her husband's brother shall go in unto her, and take her to him to wife, and perform the duty of an husband's brother unto her.
Deu 25:6 And it shall be, that the firstborn which she beareth shall succeed in the name of his brother which is dead, that his name be not put out of Israel.
Don't give up yer day job....