Whose to say that an aborted or miscarried baby is not given the chance to receive baptism of desire the last second of its life...
In order to receive the grace of baptism in the manner you are mentioning, it is necessary to have the use of the intellect and the will. This is not the case with infants, etc.
Essentially, you are positing the occurrence of a
miracle (for it would definitely be one in such a case) that allows an infant to use his (inoperative) intellect and will
before his soul is separated from his body.
Why not posit that God, WHO COULD, works a miracle in the case of
every single man, saving them all? An obstinate will is just as easily overcome by omnipotence as is an inoperative one.