The Roman legions, at least in the Republic and early Imperial periods, were made up of volunteers. Roman citizens only and, until Marius' reforms there were property qualifications for the right to be Roman soldier! They didn't need punishment battalions. Of course, if a unit did run away, it would be decimated: every 10th man would be executed per l'encouragement l'autres.