And all you can do is mitigate for disaster by border and immigration controls,  try to ensure that ethnic enclaves do not foment isolationism and trouble, and educate as best you can.

With a porous border a country is at an immediate disadvantage.