Do you think God was surprised by the Heresies in the Catholic church?
You assume that it was the "Roman Catholic" church was the ever the church of God.
Jesus left a church that within a few generations was apostate..When it was His time He removed the candlestick...
Peter gave a warning soon lost in the sale of indulgences and the replacment of the word of God with the traditions of men
2Pe 3:17 Ye therefore, beloved, seeing ye know [these things] before, beware lest ye also, being led away with the error of the wicked, fall from your own stedfastness.
Your salvation is not in your church ..or any church. Your salvation is in Jesus Christ alone...not his mother or St. Jude....not in outward acts that attempt to make God your debtor...
Salavation is as the apostles preached only in the cross of Christ
What does Jesus say in Scripture about the gates of hell prevailing against His Church?