No, thats been tried before...It didn’t work...
And if it was implemented, it wouldn’t be allowed to work anyway...
If you're referring to the Japanese internment, there is some suggestion that it did work, because there were apparently subversive contacts in the Japanese community and there were Japanese attacks on the West Coast that were not publicized at the time.
It's true that the vast majority of Japanese had nothing to do with Imperial Japan and were unfairly imprisoned; but that still doesn't negate the fact that some bad people were also imprisoned, and this may have prevented worse things from happening to our forces or even our civilian population.
Also, if Muslims realized that there was a serious cost to pay, some of them might rethink their jihadi rhetoric. Right now, they can say and even do whatever they want, in the name of their religion, but we still do not take it seriously. The reality is that if they say that they want to take over our country, act like it by trying to kill Americans and destroy our economy and institutions, and in addition have a 1400 year track record of this behavior, we should take it seriously.