IMHO God is just and merciful and loving and will take those into heaven that are not able to profess the faith because of age or disability.
But what if he gave a means. What your describing is what the Church call extraordinery means of salvation, or baptism of desire. The ordinary means are baptism in the name of the Father the son and the Holy spirit.
The bible really doesnt mention this so IMO I think all of us agree that we have to rely on God’s mercy that He would absolutely take these people and children into heaven.
Yet the Bible does mention friends and family member bringing those that could not come of there own power to Jesus and the apostles.