Of course, St. Thomas, who held to the Catholic dogma of Predestination I mentioned above, also believed that all men - who reached the age of reason (but that's a separate and deep issue) - had a shot at salvation by their free will, and resolved the fact that not all men are Catholic or Christian by believing that, if the non-Christian truly sought God with a sincere heart, God would reveal the essentials of the Christian faith to him internally (for lack of a better word), or a priest or evangelist would reach him and instruct him on the faith.
That is the Thomistic solution preserving both EENS and the chance for all men to be saved.
Of course, the case of infants puts his solution to a severe test, since a baby born in non-Christian lands, who dies in infancy, is incapable of what Pius XII called an "act of love" for God.