I thought that baptism was a sacrament for those that are born. The babies that die in utero are never born and are not guilty of actual sin, although they were conceived with original sin. I do practice conditional baptism after miscarriage, but my real hope is in God's justice and mercy. Some people assert miscarried babies become fervent intercessors in heaven for their parents. Others assert they go to Limbo, which is described as a place of perfect natural happiness without being admitted to the Beatific Vision. Both these ideas are comforting and seem just to me, although the former seems more generously merciful to babies who cannot be baptized.
I don't see how the idea that miscarried babies go to heaven even without baptism leads to heresy, either universal salvation or restricting baptism to those over age of reason, for one big reason. All born persons are required to have the sacrament, but the sacrament cannot be administered to an unborn person. Unborn persons are therefore not bound to have baptism, unless and until they are born. God doesn't demand the impossible.
Also, my thoughts about aborted babies is that God, being just, would not offer the opportunity for repentance and an eternity in heaven to those who commit the murder of an unborn person, but send that unborn murder victim straight to hell with no chance of admittance to heaven and no hope for relief from unrelenting torment. I know God's ways are not our ways, but He is the One Who gave me an understanding of justice in the first place, and that would seem unjust.
I pray that this little one that I am carrying makes it to baptism, and lives a full and holy life, but if he should die in utero, I will be very grateful to have this thread and its links as resources. God bless!