A strong no on this being "the moral answer". If people are permitted to vote with their feet maybe people are also permitted to build pickets around communities. That sounds more "moral" to me than entirely ignoring the wishes of the chosen destination's "people". IFF the destination is happy to welcome people who think their community better than their own and want to move over, then fine, that is a much better candidate for "the moral answer".
Voters have rejected this sort of cosmopolitanism at the ballot box, repeatedly. To suggest that governments should open borders over the wishes of their citizens seems to simply be an object-level misunderstanding over the goals of statecraft.
The purpose of a Republic is to be a stable entity that ensures the welfare of its citizens. It is not to have a single-minded obsession with global welfare at the expense of its own sustainability or the desires of its citizens.
I'm less confident that this was performed in either location due to direct democracy, and more because it made political sense and was expedient at the time that these locale enacted the governance structure.
In other words, it's not a one-and-done-forever type discussion, and things (clearly) evolve over time.
But "well Trump won so just have ICE kill them all" (this is what my aunt, a republican lobbyist, wants) is not a thing.
There is a moral answer, the practical answer, and two popular answers, none of which are particularly satisfying.
The moral answer is open borders. Both capital, which is generally freer than people are, and people should be able to vote with their feet. However, this is unsustainable unless all or a large bloc of countries allow it in reciprocity, or at least countries with an EU-like agreement. It would make a lot of sense for all of North America to have an EU-like agreement, economically, militarily, and legally.
The practical answer: amnesty for parents of children who are born here, conditional on criminality aversion. Like a form of probation.
The right-wing propaganda answer: immigrants somehow took jobs they are unwilling to do and therefore, while we might crack a few eggs making the omelette, all immigrants must go. Authoritarians love this view.
The left-wing propaganda: all immigrants are noble victims of evil capitalist systems, and therefore any control over borders is inherently racist and fascist. This is clearly also unsustainable, and authoritarians love for their opponents to have this view.