Since each individual confession requires repentance for sin and an intention to avoid those sins in the future, confession is assuredly NOT a license to sin. If one simply goes repeatedly to confession with the very intention of repeating the sin, no absolution can take place.
Note, however, that one can repeatedly confess a sin to which one is addicted and which you know is likely to occur again, and still have the intention to avoid it. Knowledge of one’s own failings and predilections is not a will to sin. In fact, repeated confession in such a case will help one to break the habit of sin.
I agree that deathbed conversions are rare. Still, they are possible, and sometimes the prayers or actual interventions of others may help.
An example: My father in law had a brother who had been away from the Church and all religion for many years, and was dying of cancer. He made a trip to see him in a distant city, and to be with him in his last days. While there, he contacted a local parish priest and asked that he visit his brother. As a result of that visit, his brother came back to the Church and received the last rites. He received a Catholic funeral Mass and burial.
This would not have occurred without intervention, and I have often thought what a wonderful gift he had given to his brother by this action.