This is based on a set of assumptions which are opinion, only.
The problem is not terrorism, it is jihad. In that respects, Trump’s ban is too narrow
Jihad is struggle to spread the Sharia, and to subdue those who do not recognise Allah as the sole god. There is jihad by politics, jihad by demography, and jihad by terror
Jihad by terror will not bring down western or non-Muslim civilisations, but the other two will, if not checked
Mohammed gave orders 1400 years ago, presented as Allah’s holy word to ensure compliance, that Muslims (bandits for the main part) who were outnumbered in a town were to stay low, and wait for reinforcements. Only when reinforced should Muslims attempt to take the town. This is why Muslims in small numbers do not wage jihad - they are following Mohammed’s instructions. In small numbers, Muslims can remain in a passive state indefinitely
When Muslims rise above a certain strength, they move to jihad. Modern Muslims are obviously not bandits, but they follow the strategic and tactical orders that Mohammed laid out 1400 years ago, presented as the word of Allah, which replicates the same effect. These order’s are laid out in the Koran (the words of Allah, i.e. Mohammed) and the Hadiths (which describe what Mohammed did after he spoke these words of Allah)
Muslims cannot be negotiated with, because they worship Allah, and Allah’s word (i.e. Mohammed’s orders) will always take precedence over the views of non-Muslims (“kaffirs”). The penalty for Muslims who argue with Allah is death in this world (e.g. honour killings) and hellfire in the next. The only way to contain Islam and sharia is not to import (more) Muslims.
Trumps gets this, but for politically correct reasons, he is presenting this as a terrorism issue. That is a mistake, in my view.
I do not know the U.S. policy for Muslims aleady living in the U.S., but I am not aware that Trump is proposing that American Muslims be deported. But there are many historical precedents for doing something similar; for example, Germans were deported (or interned) from Britain in 1939.
The U.S. is based on the rule of law, and if Trumps is entitled to act as he has done under U.S. law, then there is no issue legally. If he is not so entitled, then he needs to change the law. If an individual loses out due to a prior agreement with the U.S., they may be entitled to compensation or other legal redress - but that is not a reason to not prevent jihad and sharia. The duty of an American President is to defend Americans, not foreigners.