It would only be unjust to punish the innocent in certain circumstances if one holds to a retributive theory of justice. Consequentialist theories say that the punishment of the innocent can be justified in certain circumstances because of the benefits that can be accrued like deterring crimes or reforming people. I’m convinced that the punishment that God inflicted on Christ was indeed consequentialist. The Bible says Christ learned obedience through what He suffered. And punishing an innocent person would be justified if it saved the whole world from suffering in hell. Thomas Aquinas held that at the cross Jesus suffered and bore the punishment for our sins. But this punishment was medicinal punishment. It’s not the same as John Calvin’s penal substitution. We know it was disciplinary because of Isaiah 53:5 -
The chastening for our well being fell upon Him.
The Hebrew word here is musar
discipline, chastening, correction
The NASB Strongest Exhaustive Concordance
The punishment is one of medicine and well being. There’s nothing retributive in the word. Therefore, God’s justice is consequentialist in nature at the cross. Punishing Christ for our sins is justified because it gives eternal life to the world. Punishing Christ prevents the lost from suffering in hell and Christ learned obedience through what He suffered. Therefore the punishment was just.