That doesn't solve the moral problem at all. It your scenario, God still kills humans for unspecified rebellion--that could mean anything.
Deuteronomy 21:18-21
It doesn't say for moments here and there of rebellion. But the person has been thoroughly disciplined by his parents and has not changed.
Also > the command is meant to keep things from going that way. You know the command is there; so you make sure it doesn't happen. And this needs to be supported by a whole culture of people who are about God and loving as family.
And then, if some guy keeps on rejecting all that . . . that is a reason, possibly among other things, that God considers to be enough for him to be executed. And God knows if it will prevent him from becoming much
"worse and worse" (2 Timothy 3:13) so he is hurting people and ruining lives . . . much worse. So, I see how there is prevention included in how He sees this.
Plus, of course, He can do whatever is right with the guy after he dies. God will still have him. He will do what He knows is right. But the guy's own nature will have a lot to do with how it will be for him.
Satanic beings have been right in front of Jesus who is God's own Son, and they reacted to Him by being tormented!! That is really messed-up > Jesus is indeed the kindest and most wonderfully loving One, God's own Son; yet, there were even humans on this earth who hated Him. They could not stand Him. So, if they were in Heaven, for all I know they would be even more tormented than away from Him.
And our Apostle Paul does say evil people will be
"punished with everlasting destruction from the presence of the Lord and from the glory of His power," in 2 Thessalonians 1:9.
And I see how Romans 1:18-27 can mean that wrong people suffer punishment, right now . . . of how they are in their own mess of sin which keeps them weak and ruined in very horrible things of bitterness, frustration, controlling drives away from love, unforgiveness, nasty anger, and arguing and complaining which wreck their relating with ones they could be tenderly loving and intimate with in warmth of affection. Their own awful character and the cruel stuff it gives in to could be the main part of their punishment, keeping them from being able to love.
I know ones would consider that worse than being killed; and Jesus did say Judas would have been better off if he had not been born. But we need to have hope for such ruined people. Jesus on the cross so suffered and died so we do not go to Hell. But Heaven has fire, too; we need the right nature so we do well in fire >
"For our God is a consuming fire." (Hebrews 12:29)
So, I do not trust that God has certain one-size-fits-all rules for who He decides will die and when and why and how. But each person's life is crafted according to His purposes, more in the present or concerning all eternity.
And I answer to Him; He does not answer to me, to say the least. I think it is good to answer to Him, at any moment, in any situation, and trust Him to do what He wants with me in His peace >
"And let the peace of God rule in your hearts, to which also you were called in one body; and be thankful." (Colossians 3:15)