There is nothing divine about morality; it is a purely human affair. If people are good only because they fear punishment, and hope for reward, then we are a sorry lot indeed. What the individual can do is to give a fine example, and to have the courage to uphold ethical values .. in a society of cynics.
If the people be led by laws, and uniformity sought to be given them by punishments, they will try to avoid the punishment, but have no sense of shame.
But secondly you say 'society must exact vengeance, and society must punish'. Wrong on both counts. Vengeance comes from the individual and punishment from God.
Exemplary people concern themselves with virtue,
small people concern themselves with territory. The ruling class
thinks of punishment, the lower classes hope for benevolence.
Criminals, people who commit crimes, usually society rejects these people. They are also part of our society. Give them some form of punishment to say they were wrong, but show them they are part of society and can change. Show them compassion.
Guide the people by law, subdue them by punishment; they may shun crime, but will be void of shame. Guide them by example, subdue them by courtesy; they will learn shame, and come to be good.
If one leads them with administrative measures and uses punishments to make them conform, the people will be evasive, but if one leads them with virtue, they will come up to expectations.
One whose troops repeatedly congregate in small groups here and there, whispering together, has lost the masses. One who frequently grants rewards is in deep distress. One who frequently imposes punishments is in great difficulty. One who is at first excessively brutal and then fears the masses is the pinnacle of stupidity.