I would argue that offering fans a template goes miles towards to how… sandboxy the series becomes. (For want of a better term)
For Harry Potter, it was the whole academic experience. How you got admitted, the personality tests; things that enable a safe starting point and allow the fans to go in their own direction.
With Kingdom Hearts back in the day, it was Organization OCs with powers and weapons that followed a template. Similar with Steven Universe and minerals and weapons.
We probably get our best look at penal rehabilitation in Lower Decks' "A Few Badgeys More"
We learn that Daystrom Institute has a facility dedicated to evil robots, but through therapy, and exploration of art, sports, and other hobbies and psych-evaluations they may earn parole, and from there re-enter society.
Peanut Hamper made it to parole, initially as a ruse, but actually ended up taking it seriously.
Agimus is lagging behind her, but also shows signs of sincere reform.
Honestly, while a lot of it was played for laughs, I really appreciated how it really was Star Trek's optimism at its peak. People can be reformed, and are not sentenced to life in a cubical if they are capable of earning it.