If there is an established policy assigning particular punishments to certain infractions, I think these policies should be adhered to in practically all circumstances. If cheating, for example, results in a grade of zero, that grade should be given even if the cheating is freely confessed. In my experience students who confess are willing and even eager to accept such consequences.
When there is no such established policy…that just takes a lot of wisdom. I’m not comfortable generalizing beyond that.