Does Islam allow punishment based on self confession ?

Jazzak Allah hul Khair.

The punishment of Rajm, in a real islamic society, could go in favor of the criminal. If a person reverts back from his/her confession, even during the process of stoning, judge has to stop the punishment ..

no other system offers that leverage to the criminal ..

when confession is given so much importance, right of denial is also given to the accused, in Islam.