All children are safe with God until they come to the age of accountability. That age varies from one child to the next, only God can make that judgment. When a child is at the age of accountability they have a capacity to understand, to receive or reject and they can agree or disagree. For parents or a family having their infant go through a ceremony of water baptism, that is not a surety or an absolute for regeneration. The child can have favor of God being brought up in the nurture and admonishing of the Lord, but there will come a time when accountability happens and they will come under conviction of the gospel. At that moment they will either receive or reject that conviction of the gospel and if received, they will be saved by grace through faith.
Letting the little children come unto the Lord in the church and work of the ministry is to have a place for children to learn about Christ and to draw them near the love, compassion and gentleness of the Lord. That will cultivate in them a capacity for Christ and the grace of God to the saving of their soul. Ministering to children is an important part of the church and family within the local church and without. It does no good to repudiate those who have been baptized as an infant, what is important is that they are followed up and cared for by the church and the families that make up the local assembly.
Psalm 68:6a, 107:4-9, 127:3