In the instances you mention, the government tended to pass gun control or confiscation before engaging in widescale tyranny. In 1938 Nazi Germany passed a gun control law that effectively gave 'true Germans' vastly more gun rights (which had been compulsory rescinded at the end of WW1) yet, they it simultaneously prohibited Jews from owning any weapon - even knives. [1] The holocaust began in 1941.
In 1924 in the Soviet Union all firearms were banned except for smoothbore shotguns which pose minimal In the danger outside of close range. [2] This was greatly expanded with increased penalties and also eventually applied to knives as well. The culling of opponents and directed starvations began around 1929 leading to the deaths of millions of Soviets.
In 1966 China laid out the foundation of their now famously strict gun laws. That was the same year that Mao began the "Cultural Revolution" leading to the deaths of millions of Chinese.
Ultimately their civilians, by the time the worst came, had no way to pose any resistance. And so they died.
---
As for our situation, I think we can appeal to the declaration of independence: "Prudence, indeed, will dictate that Governments long established should not be changed for light and transient causes; and accordingly all experience hath shewn, that mankind are more disposed to suffer, while evils are sufferable, than to right themselves by abolishing the forms to which they are accustomed. But when a long train of abuses and usurpations, pursuing invariably the same Object evinces a design to reduce them under absolute Despotism, it is their right, it is their duty, to throw off such Government, and to provide new Guards for their future security."
You're comparing a transient discomfort for a relatively tiny number of people entering the country illegally, to events where millions of citizens were systematically and intentionally killed or starved to death by their governments.
[1] - https://en.wikipedia.org/wiki/Disarmament_of_the_German_Jews
[2] - https://en.wikipedia.org/wiki/Gun_control_in_the_Soviet_Unio...
[3] - https://en.wikipedia.org/wiki/Gun_control_in_China