You are suppose to hope to die a Catholic.
Catholics obey Christ and His divine Church that he designed for our salvation.
You live in a diocese. Your Sunday obligation is not fulfilled without going to Mass in your parish.
You say you cannot trust him to save your soul because of the heresies flowing in the parish? then contact your bishop.
You say your bishop won't do anything about it because he is filled with the same heresies? then contact Rome.
You say Rome won't do anything about your bishop's heresies, and you know of no other parish that is any better?
Then you just effectively concluded the man in Rome is not a true pope. Otherwise Christ would have designed His Church in vain, and that is a blasphemy to say.
The hierarchical structure is divine, those who are heretics don't represent that structure. It's impossible for a true pope to know about it and do nothing.
There is another option. Not Stubborn's option. His option of believing that a man can be a heretic and Pope at the same time is itself heretical.
In the situation you describe, it is possible that the legitimate Pope could be hindered from doing something about the heresies. Our Lady of Fatima (and other private revelations) say that "the Holy Father will have much to suffer." His enemies inside the Church will make him appear to be weak, stupid, heretical, etc.
The Cardinals running the Curia are the real problem. And, let me be clear, Bergoglio and Prevost are nothing but usurping Cardinals because they were never elected in a lawful conclave to begin with.
And, the Parable of the Wheat and the Cockle suggests that the legitimate Popes will be providentially prevented from doing what you wanted them to do in the end times [Matthew 13:24-30]:
24 Another parable he proposed to them, saying: The kingdom of heaven is likened to a man that sowed good seeds in his field. 25 But while men were asleep, his enemy came and oversowed cockle among the wheat and went his way. 26 And when the blade was sprung up, and had brought forth fruit, then appeared also the cockle. 27 And the servants [
Popes] of the goodman of the house [
Jesus] coming said to him: Sir, didst thou not sow good seed in thy field? whence then hath it cockle? 28 And he said to them: An enemy hath done this. And the servants said to him: Wilt thou that we go and gather it up? 29 And he said: No, lest perhaps gathering up the cockle, you root up the wheat also together with it. 30 Suffer both to grow until the harvest, and in the time of the harvest I will say to the reapers: Gather up first the cockle, and bind it into bundles to burn, but the wheat gather ye into my barn.
See Aquinas's commentary on why God would allow such a thing:
https://aquinas.cc/la/en/~Matt.C13.L2.n1145