Are you saying that Onan performed an act of normal, non-contracepted intercourse?
No, I'm saying your interpretation of God's judgement is not in the passage.
It is a Roman teaching you are bringing into the passage.