Bob is a criminal. He kidnaps children for ransom and then kills them instead of returning them to their parents. He really needed the money. He feels very bad about what he did. He confesses his abominable acts to his priest and receives absolution. Bob is hit by a car, dies and goes straight to heaven.
Joe works on Saturday. He dies and goes to hell.
A mass murderer, after confession, will go to heaven. A wonderful person, having only worked on sabbath, will burn in hell. Feel free to replace “working on sabbath” by your favorite sin, coveting another woman, stealing office supplies, …
Automatic pardon seems to add confusion to the whole reward/punishment, heaven/hell conundrum.
If you calculate to confess just at the last minute before dying, you can get away with anything. If you slip up just once, but die before confession, you burn. If you get the commandments wrong and do something sinful out of ignorance, you’re toast.
To be sure you don’t die at the wrong time, it would be good to plan a confession right after each horrible act.