The question is why does God permit innocent children to suffer, e.g., Herod’s slaughter of the Holy Innocents.
We need to begin by considering the world we live in. God created the universe in perfect harmony with His will, and therefore there was no human suffering. It is not clear that animals did not suffer, e.g., that robins did not eat worms.
Lucifer rebelled against the established order, causing disharmony and suffering among the angels. Lucifer tempted Adam and Eve to follow his example, they did, and suffering entered the human world. God could have avoided this suffering by not creating Lucifer, but He chose to do so. Still, God did not cause Lucifer to rebel and He did not cause Adam to rebel. On the contrary, God created Lucifer and Adam in perfect happiness according to angelic and human natures.
God destroyed the world by a flood to stop the evil and suffering that had spread throughout the world, but evil began building up again immediately because human nature was damaged by original sin. Then God became Man and submitted to suffer and die at the hands of man and the designs of Lucifer to make up for all the sins that had violated His love and divine justice.
Jesus created a Mystical Body, in which He resides within the baptized organized into the Church (which includes all the baptized in principle) to which He has given the mission of teaching the Gospel, praying for the conversion of sinners (“Whatever you ask for in prayer…”) and suffering (“Take up your cross…”) for the conversion of sinners and the renewal of the world.
Suffering is caused by sin, original sin and personal sins. God requires all Christians to participate in renewing the world through teaching, prayer and penance – not only for our own sins but for the sins of the world as Our Lady made clear in her message at Fatima. At Fatima Our Lady said that if we want peace on earth and less suffering Catholics need to pray for the conversion of sinners and offer our daily crosses as reparation for their conversion. In the degree that Catholics neglect to fulfill this obligation, suffering will continue and increase in the world.
If all Catholics fulfilled our obligation to pray and offer penance for the conversion of sinners there would be peace on earth and suffering would be greatly reduced. However, because of original sin there would still be suffering caused by evil men and by the disorders of nature, e.g., disease; but one could hope there would be more grace, giving guardian angels more power to prevent or reduce natural suffering.
Those who sin suffer for their sins. Those who live in the state of grace suffer as members of the Mystical Body of Christ for their own sins and especially – united to the Cross – for the sins of others who need reparation in order to receive the grace of conversion (Our Lady taught this at Fatima). Innocent children who have no personal sins suffer because of the sins of others, including the disorders caused by original sin; but they are in the hands of an infinitely loving God who will give them eternal bliss so intense that their suffering on earth will not matter. Since they are innocent of personal sin, we can expect that their suffering is used by God for the salvation of others (remember that Jesus and Mary were themselves perfectly innocent).
This is how God chose to set up His creation. We need to trust Him, especially in view of His loving decision to become one with us and submit to intense suffering and the most painful death devised by man in order to reopen the gates of heaven to people of good will.
This present life on earth is not what everything is about. Since the Incarnation, life on earth is about restoring what was lost by original sin, and the suffering of the innocent has its place in this renewal.