Skeptical Third World Kid

so you're telling me

god knowingly creates a faulty product, punishes it for its faultiness, and then kills almost all life on this planet, because original punishment is not enough. realizes it s a bad plan, so he kills his only son to save his faulty creation from himself?