(Casti Connubii) 55. “Small wonder, therefore, if Holy Writ bears witness that the Divine Majesty regards with greatest detestation this horrible crime and at times has punished it with death. As St. Augustine notes, “Intercourse even with one’s legitimate wife is unlawful and wicked where the conception of the offspring is prevented. Onan, the son of Juda, did this and the Lord killed him for it.”[45]”
Thanks for pointing out this quote. Of the examples that irenaeus provided, this is the only one that seems relevant.
I’ve been thinking and praying about this question, and it seems to me that there is middle ground here. We know that there are many senses of Scripture, and that in addition to the literal sense, there is also the moral sense. I think that I would argue for a ‘both/and’ approach here, rather than an ‘either/or’ approach.
In other words, we see that (for instance, in Casti connubii), the Church is calling us to see that the example of Onan demonstrates that his actions (i.e., using sex in a way that’s neither procreative nor unitive) is wrong, and that God detests this use of human sexuality. After all, in context, Pius isn’t talking about masturbation or coitus interruptus, but rather, an approach to sexuality that is disordered due to its desire to nullify the potential fecundity of the sexual act. So, in this case, we have a quite appropriate moral interpretation of what is going on in Genesis 38.
However, that’s not all that’s going on. I still maintain that, on the literal level, Onan is both lying and attempting to avoid his responsibilities as a brother-in-law: he doesn’t tell his father ‘no’, but nevertheless acts in a way that disobeys his father. (Later in the OT, under Mosaic law, he could tell his father ‘no’, and bring humiliation upon himself, but he doesn’t even attempt to tell his father ‘no’ here.) So, at a literal level, I think Scripture is showing us something in addition to the moral lesson on sexuality: at that point in time, attempting to avoid his responsibilities in Levirate marriage, and deceiving his father, and unjustly using his sister-in-law sexually, all merit his death.
So, I think it’s ‘both/and’. We’re used to seeing the moral lesson about sexuality, as taught throughout the ages. I don’t think that this precludes seeing that both lessons (moral and literal) are valid; in fact, attempting to argue for only one seems to be the less praiseworthy approach.
What did Onan do? Scripture plainly tells us he spilled his seed. I’m not seeing any room for adding my own personal interpretation to that verse to come up with some other reason except what the Church teaches.
Here’s the thing, though: the
material cause of Onan’s sin was coitus interruptus. The
formal cause, though, was his disobedience to his father and his unjust sexual use of his sister-in-law. He could have done this in a number of ways; he simply chose coitus interruptus as the means to achieve his ends. I would argue that asserting simply for the material cause is the weaker case here; and asserting for the formal cause isn’t ‘personal interpretation’, per se, especially if the Church remains silent on the literal sense in this passage. (Which, I’d assert, she does, as evidenced by the fact that the discussions we see on this issue are always in the context of moral teachings on sexuality.)
Are you going to provide the Church document that supports this theory that Onan’s sin was “like the actions of Ananias and Sapphira in Acts 5 – they, too, attempted to lie and say that they were following God’s law”? Because the only Church documents I have read say that Onan’s sin was preventing the conception of offspring…not attempting to lie.
This goes to my point, I think. The fact that “the only Church documents” that discuss this are teachings on sexual morality, demonstrates that there
isn’t a definitive teaching on the literal sense of this passage; therefore, it’s safe to make the case for ‘lying’, as long as it doesn’t contradict Church teaching.

(And so, if your case for ‘lying’ attempts to say that lying was the only sin, then you run afoul of Church teaching on morality; but if your case for ‘lying’ affirms that the means that he chose – coitus interruptus – is likewise evil, then all is good.)