And the problem with this is??? Humanity has no interest in keeping "hard core terrorists" incarcerated for long terms. It's all just a lot more simple in every respect to make them martyrs - exactly as they originally desired. We're providing a service to them.
Assuming that one can trust government's honesty and infallibility in finding if someone is a terrorist. The judicial process with lawyers, juries, appeals, etc has a number of functions, including one to reduce the erors.