It seems like the basic idea behind punishment is that by punishing someone who has committed a wrong, it averts the punished from committing another wrong and returns a wrong committed to make things fair. This sounds good in theory, but there are various problems in implementing such an idea.
This is where the punished perceives themselves as the victim. They have been harmed much more by the punishment than the harm the wrong they committed did. They become the victim and commit further crimes as an act of justice.
Using Punishment to Set an Example
In this case, the punished will be punished not to deter them from committing a future wrong, but to deter others from committing wrongs. This is clearly unjust as the punishment takes on the form of an Unjust Punishment and people are treated as statistics. China's system of justice seems to follow this to keep a large population under control.
The Wronged Determining Punishment
Another question that comes up - Do the wronged have a right to decide how much punishment and what kind of punishment the wrong-doer deserves? In some sense, to give the wronged this kind of power is to let them have a kind of revenge. But if the wronged are the ones impacted by the wrong, don't they deserve to punish the wrong-doer for what they feel is equal harm? However, the wrong-doer may not feel that their punishment is equal; and if this is the case, then the wrong-doer will see themselves as the victim. This would not help anything, but at the same time the wronged are just returning the harm put on them. One wonders if conflict and war are inevitable in this case. Both would feel injustice.
The Wrong-doer Determining Punishment
Another thing to consider is whether or not the wrong-doer feels any regret over what they have done. If they do feel great regret, then less punishment is needed to keep them from committing another wrong. But then again, the wronged might feel the wrong-doer deserves to have the harm they inflicted, inflicted back at them, and not any less. One then wonders, would the wronged be acting strictly out of revenge here? And in this case, because the wrong-doer feels regret, they will allow the revenge to take place, and receive both the harm they inflicted and the harm of their regret. This wrong-doer has now been harmed more than they harmed.
So what then is an ethical way to approach punishment?