“Great” does not mean “total”: the wheat and the tares, and the remnant
Rome admits bad bishops and an unfaithful majority without giving up its promise, because it places it in the definition and not in the faithful. But the foretold defection is one of doctrine (40a1), and that is why it is measured by what was defined (40e). It remains to see what it means for it to be “great”.
Christ taught that the wheat and the tares grow together until the harvest, and that rooting up the tares before would root up the wheat with them (Matt 13:24-30). Paul warned the Gentiles not to boast against the broken branches, because God can cut them off too (Rom 11:20-22). And to the church of Ephesus he said: “thou hast left thy first love… I will… remove thy candlestick out of his place, except thou repent” (Rev 2:4,5).
The promise that the gates of hell shall not prevail (Matt 16:18) is indefectibility: the church does not disappear; not sinlessness or immunity to a great corruption. Westminster says it plainly: the purest churches are subject to error, and some have so degenerated as to become “synagogues of Satan”, but “there shall be always a Church on earth” (25:5).
So “great” has to mean widespread and official, not total. If it means total, the argument becomes restorationist and cuts off the branch it sits on.