Carter used it himself to keep Iranians out of the country back in 1979. Then he made all Iranian students already here check in, and then he deported a bunch. Seven thousand were found in violation of their visas, 15,000 Iranians were forced to leave the United States in 1979.
Yes they can use immigration law against those here, as you say many have visa violations. If we strictly enforce our immigration laws a lot of problems are solved, and that would hold up as long as we are going after everyone the same.
I think what he means is if we set up a new system to deny Muslims in general that would not hold up in court. We can deny people who do not meet our immigration requirements no matter where they are from or what religion they are.
We can deal with the Muslim/and or refugee problem, we just have to do it in a way that will hold up in court.
The thing is courts have been bending over backwards to extend rights to people illegally in this country since Carter kept out the Iranians. Now courts generally consider that people who are not citizens here have the same rights we do, and the government is not allowed to violate anyone’s Civil Rights with a policy.