I have met a lot more people who are outwardly good who are pagans, than Catholics. There are a lot more bad Catholics than good Catholics. Is it because the devil particularly assails those who have the Truth? A pagan can try to be good, by acting upon the graces that God sends him. He can choose to practice virtue and abhor vice, and the knowledge of which is which, the natural law, is written on his heart just as it is written on ours, as we are all created by God.
I've known several saintly Catholics, and know of hundreds or thousands of canonized saints. I've never met a saintly pagan, only fairly virtuous ones. Only God, who reads hearts, knows how much these fairly virtuous pagans acted in good faith, what graces they cooperated with, what graces they rejected and refused to act upon, and how culpable these people really were for the actions and inactions of their lives. What is certain is that had they had the gospel preached to them, and accepted it, and enjoyed the aid of the Church and the sacraments throughout their lives, they would have had much more efficacious aids to virtue, weapons against vice, and would have fully cooperated with God's will by doing so. If they didn't become a Catholic, only God can say whether their reasons were justifiable, (ignorance of the existence of the church, ignorance of the teachings of the church, bad example by Catholics who should have known differently, etc.) and only God can choose whether to extend to them the sanctifying grace to save their soul. We don't know, and can't know, and must therefore prudently assume that in most or all of these cases, they are probably damned. However we can hope, in God's mercy, for their salvation, even if we cannot have "good hope." We know that God loves us all, individually, and wills our salvation, that He gives every human soul the graces necessary to save their soul, and that if a soul is damned, it is due to that soul's own selfish will, in the end. What, precisely, the graces are that God gives to a pagan in the deepest depths of the Congo, or a schismatic in a little town somewhere on the Volga, are known only to Him.
However, WE know that the ordinary means that God wills to give grace to mankind is via baptism and the Church, and that it is therefore our duty to help God in his great work of redemption, by doing our part to be good Catholics, and to spread the gospel, attempting to make everyone in the world a Catholic.