OK, that makes sense. So Jesus is actually excluded by the immediate context.
Now explain how “all” applies to the Holy Innocents and to everyone else who the scripture describes as righteous.
I believe that there are only two kinds of righteousness, actual and imputed. The only way anyone other than Jesus can be wholly righteous is to have the righteousness of Christ imputed to them. If anyone could actually keep the law and become wholly righteous on their own, there would be no need for them to have a Savior.
From your question, it seems that you believe that the Holy Innocents were righteous. Yes? How so? I only know the will of God as it has been revealed in His word and I do not know His will (judgement) for babes who die before they can commit actual sins. I know they bear the curse of original sin but I do not know if God graciously saves them by imputing the righteousness of Christ to them. I take the view of King David, that God saves them by grace but I do not know.
We are all capable of the most heinous of sins, and only God's grace keeps any of us from being as those described in Romans 3.