But if you are righteous God won't punish you for your father's sin
Ezk 18:17
Who has withdrawn his hand from the poor
And not received usury or increase,
But has executed My judgments
And walked in My statutes—
He shall not die for the iniquity of his father;
He shall surely live!
But I think we are missing the point that, whether baby in the womb or 90 year old sinner, being a descendant the first Adam doesn't get you into Heaven so you need to be adopted into the second Adam. To me the question is can God give a person grace, faith and the Holy Spirit and adopt a baby after they die? Some people say that original sin makes us unacceptable which I agree with but why does death stop God from witnessing to a baby?
1 Peter 3:19 by whom also He went and preached to the spirits in prison, who formerly were disobedient, when once the Divine longsuffering waited in the days of Noah, while the ark was being prepared, in which a few, that is, eight souls, were saved through water.
If God preached to these souls for judgment why couldn't He preach to a martyred child for salvation ?