If soldiers are punished before they have grown attached to you, they will not prove submissive; and, unless submissive, then will be practically useless. If, when the soldiers have become attached to you, punishments are not enforced, they will still be unless.
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.
It isn't the desire to abide by the law that makes everyone behave as society requires, but the fear of punishment. Each one of us carries a gallows inside us.