Every country ever has had borders that were closed to immigration to some extent, that is part of the definition of what a country is. The USSR had closed borders to prevent emigration however I do not know of any democracies that do this, although one could argue America's exit taxes are a soft form of it.
The idea that immigration controls are un-democratic is a very modern idea and one that is entirely indefensible.