The various currently suspended halachos regarding which converts of which various nations can marry into Israel might prove to be instructive in another way. Specifically, they might be indicative of how to draw borders and maintain border security; or, at least, they might obviate the idea that an "open borders" policy is a "Torahdikke" one.
In this week's parsha, we discover that of converts from Edom and Egypt--of either gender--may marry into the Jewish people after three generations, but male Moabite and Ammonite converts may never marry into the Jewish people.
Meanwhile the Jews have been admonished earlier to not harrass the Ammonites and Moabites, ostensibly owing to their being related to us through Lot. This might explain why--before the incident at Shittim--the Jews are as respectful of the Moabite and Ammonite borders as they are of the Edomite borders; and while the Edomites meet them fully armed at their border, innthe immediate term Moab and Ammon, while not helping ["lo kidmu belechem ve'mayim], weren't overtly hostile.
This begs the question: why do they come in for the most draconia level of exclusion, while the Edomites (who were overtly hostile) and the Egyptians (who enslaved us and attmepted genocide on other occasions) don't come in for the same level of restriction?
Vis a vis Moab, we have a rathe simple explanation: the nonaggression policy wasn't reciprocated by the Moabites. As Tosfos BK 38a s.v "Nasa Kal Vachomer" explains, the Moabites broke the pact when they hired Bilaam.
The Kli Yakar explains that Bilaam told the Ammonites and Moabites not to offer bread and water, and in their hunger, the Jews would eat from the altars of Moab's idols, and due to their thirst, the daughters of Moab would be able to ensnare them by giving them wine and then offering themselves on condition that they worship their idols first.
These incidents explain however indirectly how: there are legitimate ways to defend borders; there are illegitimate ways of gaslighting under the guise of "aid"; and, finally and most importantly--because this bears repeating--a "ger" is not an immigrant.
In a sense, Egypt dealt with us in part in a more legitimate fashion than Moav: the Egyptians invited us in unconditionally as legal immigrants, and then changed their minds. Moav at first didn't invite us (and we weren't even looking to settle!!!), and then gaslit us and used our hunger to "invite" us in on their own terms which was to our detriment. Furthermore, the Egyptians didn't deliberately destroy their own society to get at us--G-d did that for them with the plagues. Moav did, by pimping out its entire womanhood (which might further explain why only the men were closed out of conversion: the women might have been "drafted"). Also, by engaing Bilaam, Moab's war became as much about annihilation as Egypt's slavery. In the end, they're a lot cloer to Amalek than Mitzrayim, or even Edom, Amalek's grandfather, Edom, who met us en masse at the border, but didn't make any other hostile pretenses.
So what we have is Egypt, who invited the Hebrews/Jews as guests under legitimate pretenses and then turned on them; Edom, who made no pretenses other than defending their borders; and Moav, who repaid nonaggression with both physical and spiritual war.
Egypt was severely punished, but the punshiment ended at the Red Sea; the reason to not be “hate Egypt” is because they took you in when their government forced you to and endured wholesale changes to their way of life and then were destroyed when they became xenophobic. The xenophobia was severely punished, but national integrity and borders were a legitimate issue. So they get 3 generations, as do Edom, who fares no worse than Egypt.
Moav/Ammon are the most restricted, commensurate with the level of hostility and treachery: they weren’t foreign to you; there may have been least some split in the popular opinion, seeing that the women are exempt from the restriction, and even the ones who were in the avel shittim averaged may have been “drafted”. Moav, essentially, had less respect for its own borders than the Jews did.
It's been mentioned several times in these pages that no matter how many times the Torah says not to oppress the "ger", it doesn't bring the definition of "ger" any closer to "immigrant" . BT BM 59a lays out why: the primary reason given to not oppress the ger is that the convert will be tempted to defect, indicating that the primary issue is a religious one rather than a political one. Even when the same Gemara mentions you were "gerim", it brings us back to our orignal point: you were legal invited immigrants, THEN you were betrayed. A "ger" who committed oneself to all the protocols involved in gerus: THAT'S who you're supposed to love and not oppress and not betray. If gerus were a real model for immigration, we might attempt to dissuade every potential border crosser three times before we considered allowing them in.
Those who would link shibud mitzrayim with the ostensible plight of border crashers commit a rather egregious form of cultural misappropriation; even worse, they commit it from within. Not only does advocating for stricter immigration law not violate this injuction, but the two "mumin" of gerus mitzrayim and "Abolish ICE" are not remotely comparable. The analog is at best intellectually dishonest, and at worst--disloyal.