Ideally, confession alone should not be deemed a sufficient ground for conviction, it should be merely something that might make further investigation and, ultimately, establishing "the whole truth" easier. (Looks like the latter is not the goal of the Western judicial system, hence the wide acceptance of the "plea bargain" practice which effectively encourages false confessions.)
There is a similar-ish thing in Poland but I don't know how widely it's used or the details of it. You can formally ask to be punished right away. The prosecution must agree too and the court must find that what you said proves that you did what you claim you did. The upside is that it's quicker for you and you can try to get your punishment to be lower, the upside for the court and the police is that they don't have to do a lengthy procedure as they would if you tried to fight back. You also can't do it for crimes that are a "zbrodnia" ('fedolny, sort of, minimum 3 years in prison), just for ones that are defined as a "występek" ('offense', .. again, sort of).
AFAIK in most countries the plea bargain is not allowed as it is considered a violation of the accused's civil rights as well as a violation of justice.
Civil rights because of the inherent asymmetry of power (violation of the Geneva convention on torture since you're getting a confession, whether legitimate or not, under threat of force).
Violation of justice because if the person is found based on the evidence to be guilty then they should get the appropriate sentence; if not they should not. In theory the plea bargain is "clemency for taking responsibility and admitting guilt" -- in practice it of course is not. And someone who pleads guilty without a prior agreement will be at a disadvantage, again leading one to believe that the plea bargain case is for the innocent.
USA's system of "plea bargains" where you can be literally threatened with death penalty and tortured to forced a confession out of you is such garbage I'm speechless whenever something like that (innocent mentally disabled people getting pushed into confessing) happens but many people are okay with it and applaud it since it'll never happen to them and they hate mentally ill anyway.
It's clear that there also needs to be a change in culture and training among police services to discourage the intuition-based practice of deciding someone is guilty and then pressuring (borderline torturing) them to say something that can be taken as a confession.
This incorrectly presupposes that the US judicial system's goals is to not convict innocent people, when in fact its goal is to perpetuate class warfare using tools derived from a system to enslave Black people after non-prison slavery was abolished in the 1860s.