#1) Wojtyla received the Anointing of the Sick, not traditional Last Rites.
#2) these do not save an unrepentant heretic or sinner, so it's neither here nor there. Receiving Last Rites is no guarantee of salvation.
#1) Pope John XXIII received the traditional Last Rites, not the Anointing of the Sick which was not yet invented at that time. Interestingly enough, I have only read that JP2 received the Last Rites, not the Anointing of the sick.
#2) A reason to believe that Pope John XXIII repented, is that he requested the Last Rites. I cannot find where JP2 requested them, but he did receive them - and no, there is no guarantee that receiving the Last Rites guarantee salvation, but that IS the reason God made them a sacrament and it is only with faith that we believe they achieve their purpose.
If we have the certainty of faith and believe that the sacraments of Baptism remits all sin, Matrimony joins man and wife, Penance forgives sins etc., then it is with that exact same certainty of faith we must believe that the Last Rites, as Trent taught, washes away sins and the vestiges of sin and prepares us for entrance into heaven.