How is that going to traumatize anyone in any undesirable way?

Trauma is associating one thing (an action, place, or thing) with a strongly negative outcome, and the more strongly negative the initial outcome is, the more likely the subject is to avoid that act/place/thing in the future.

If these kids are associating violence and socially unacceptable behavior with getting put in jail, and associating jail with a really unpleasant experience that they never, ever want to live again (without being physically hurt in the process) then that's A-OK with me.