I don't read the parent as conflating a flawed justice system with teaching morality.
I read it as using the failure of the justice system as an example of his larger point: Personal responsibility is a personal lesson that requires personal choices and experiences. It’s not something you can publicly mandate.
The justice system was one example of a failed attempt to publically mandate morality.
You are conflating a flawed justice system (prison) with teaching morality. They are not the same.