I don't know the answers to these questions, I would want an expert to weigh in.
This does not mean the answer is executions though, as people's lives and happiness have value even if they're scumbags.
Might ask yourself the same question about shoplifting gangs being let loose
And if Riker's is a problem, then deal with that specific problem. Not prosecuting people seems to be one level removed from it. (yes, they are connected, but for example, not sending pre-trial people there could be a start)