Old Onan got a bad rap, I think.
He was accused of inventing self-abuse, but insofar as
I can tell it was coitus interruptus that was his game.
And, as good theologians point out, his sin was not so
much the particular act as it was his disobedience to the
divine command to impregnate his sister-in-law.