Every person will have to pay for their sins to "the very last penny" (Luke 12:59).
What the Catechism of the Catholic Church says on "Purgatory:"
1031. "The Church gives the name Purgatory to this final purification of the elect, which is entirely different from the punishment of the damned. [Cf. Council of Florence (1439): DS 1304; Council of Trent (1563): DS 1820; (1547): 1580; see also Benedict XII, Benedictus Deus (1336): DS 1000.] The Church formulated her doctrine of faith on Purgatory especially at the Councils of Florence and Trent. The tradition of the Church, by reference to certain texts of Scripture, speaks of a cleansing fire. [Cf. 1 Cor 3:15; 1 Pet 1:7.] As for certain lesser faults, we must believe that, before the Final Judgment, there is a purifying fire. He who is truth says that whoever utters blasphemy against the Holy Spirit will be pardoned neither in this age nor in the age to come. From this sentence we understand that certain offenses can be forgiven in this age, but certain others in the age to come. [St. Gregory the Great, Dial. 4, 39: PL 77, 396; cf. Mt 12:32-36.]"
1472. "To understand this doctrine and practice of the Church, it is necessary to understand that sin has a double consequence. Grave sin deprives us of communion with God and therefore makes us incapable of eternal life, the privation of which is called the 'eternal punishment' of sin. On the other hand every sin, even venial, entails an unhealthy attachment to creatures, which must be purified either here on earth, or after death in the state called Purgatory. This purification frees one from what is called the 'temporal punishment' of sin. These two punishments must not be conceived of as a kind of vengeance inflicted by God from without, but as following from the very nature of sin. A conversion which proceeds from a fervent charity can attain the complete purification of the sinner in such a way that no punishment would remain. [Cf. Council of Trent (1551): DS 1712-1713; (1563): 1820.]"
To this, you should add the passage of the atonement for the dead in 2 Maccabbees.
Everyone finds something on salvation and judgment in various parts of the Scripture/Tradition. These are pieces of a puzzle (mystery). The Protestants hold that salvation is by faith and that trying to be(come) sinless is futile; we can do as best as possible, but will never succeed. The Catholics are constantly "pinching pennies" so to say, paying back the "debt" with their indulgences, and the Orthodox hold that the entry ticket depends on how "Christ-like" we have become. All this tells me that no one has the key.
"O God of spirits and of all flesh, You have trampled upon death and have abolished the power of the devil, giving life to Your world. Give rest to the soul of Your departed servant (Name) in a place of light, in a place of repose, in a place of refreshment, where there is no pain, sorrow, and suffering. As a good and loving God, forgive every sin he (she) has committed in thought, word or deed, for there is no one who lives and does not sin. You alone are without sin. Your righteousness is an everlasting righteousness, and Your word is truth."
What we pray for is mercy, perhaps God's mercy in overlooking the effects of the sins of the deceased which have limited that person's likeness to God. Perhaps the fire of God's love, extended quite on its own by the way and not because we ask for it, burns the soul and so burnishes it into a likeness of God.