It’s a good plan, in theory.
Unfortunately, mental disorders have been one of the most popular go-to excuses for totalitarian regimes to imprison their political opponents.
So I’m not sure that would be a workable solution in our modern times.
If sociopaths implement it, it will be a disaster for sure!
;-)