Well, barbed wire on borders and militarised border guards who are authorised to shoot tresspassers outside of the official crossing points are a thing on quite a few borders, and used to be even more common just a few decades ago, e.g. the Warsaw pact and USSR borders.
It's not a pleasant option, but it is an option that countries can choose to take if the circumstances suggest that it's in their best interest. The last 25 years have seen a trend of more open borders in and around Europe, but if the circumstances change, that trend can reverse itself.
And while such closed borders are more common in various dictatorships, given the political trends we're seeing in many elections worldwide, it's not particularly implausible that such policies could get majority support also in democratic countries if the economic conditions deteriorate, for example, because of climate change.
It's not a pleasant option, but it is an option that countries can choose to take if the circumstances suggest that it's in their best interest. The last 25 years have seen a trend of more open borders in and around Europe, but if the circumstances change, that trend can reverse itself.
And while such closed borders are more common in various dictatorships, given the political trends we're seeing in many elections worldwide, it's not particularly implausible that such policies could get majority support also in democratic countries if the economic conditions deteriorate, for example, because of climate change.