I really like the on-going gag that Starfleet/The Federation is actually as idealistic as it attests to be. It would be far too easy to leave Daystrom as Star Trek's version of Arkham Asylum. But while the methods of rehabilitation may have been played for laughs, letting Peanut Hamper, Agimus, and Tyrannikillicus walk the path to re-enter society was honestly really appreciated.
If this has been DS9, Picard, or Discovery… I probably would've expected an Arkham Asylum angle… where the inmates are all in varying stages of vowing revenge. And, it's easy to imagine the more Megalomaniacal inmmates may indeed be as such… I still appreciate that Daystrom's shown in the light that they can be reformed.