If that is the goal, then it is sheer stupidity.
Desperate people often think they have nothing left to lose. Whether this is stupidity, or a wisdom, time will tell. I'm not so sure about pundits denouncing current trumps policy just yet. Despite how outrageous it is, it has little to no practical impact. The impact of wages >120k for H1B immigrants is much, much higher and the true point of contention.
On the other hand, if you look at the actual countries banned, and the actual number of workers involved in the ban (some of the tech giants publicized this number), you see that the impact is rather low (bulk of H1B tech immigration is asia, definitely not egypt). Basically you're jumping to conclusions based on petty gesture policy.
"If value corrupts then absolute value corrupts absolutely."