I'm thinking of Trump's attempted Muslim ban. Boris could be our next PM and it's not beyond the realms that he'd attempt one. Is our system as robust as the Americans to overturn it? I don't think so.
We could ban all visitors from selected countries, Somalia, Syria, wherever, and next turf out anyone living here from those countries or with heritage from them. It's the natural step. And I guarantee there are people reading this post who think "good, let's do it".