Is capital punishment by a Noahide court rectification for the individual?
The answer is yes because it rectifies his soul and serves as an atonement, but as we have limited understanding and do not see the whole picture, it might be hard to see this truth. Basically, sinning is like drilling a hole in a watertight boat. Being too forgiving to sinners means being cruel to innocent people who will suffer from those sinners. This is one of the reasons why there is capital punishment in the Noahide code and the Torah as a whole. We can never understand the depth of heaven’s judgment. But capital punishment might clean the spiritual dirt from the soul of the sinner and help his soul be rectified.
G-d is merciful, and punishment is a way of rectifying sin. Certainly not revenge. It is certain that sometimes G-d almighty sees that repentance will not happen in this specific individual, so the better choice for him might be reincarnation, meaning giving a second opportunity. So basically, even capital punishment is not revenge, on the contrary, it is another opportunity for atonement and maybe another reincarnation.
This is why capital punishment is actually something that the sinner caused to himself. Some sins cut off spiritual vitality, and this results in punishment. So capital punishment should serve as a warning not to sin if we want to have a good society. If society is too forgiving to sinners, it means cruelty to innocent people who will suffer because of many cases of severe crimes. Overall, this punishment serves as a warning and to secure the lives of those who might suffer from hard crimes.
In the time of redemption, everyone will be busy knowing G-d, hence, a crime will be very rare, and mostly there will be no need for capital punishment. Most importantly, the world will be filled with the divine wisdom of Hashem.
*This is from a series of articles by Rabbi Bernstein Moshe.