I’d be inclined to agree that confession is very therapeutic for a lot of religious people.
Of course, one of the great myths is that confession cleans the slate and you can go out committing the same crime again and again, eg Mafia. You’re supposed to repent, and resolve not to do it again.
The old proverb does say “confession is good for the soul”. Better than bottling up your problems.