I see many videos on youtube where they tell you to get residency visa in countries that are unlikely to be involved in a world war 3.
Is it really enough to have a residency visa? I think the country you are a citizen in can still force you to come back to join the war if they want to. Either they already have such a law or they can create one when it's time. The country you would have a residency visa at would have to deport you. I think the only way to avoid such a situation is by getting citizenship in a country that is unlikely to join a war, so residency is not enough.
You are worrying about the wrong thing my friend. If WW3 breaks out and nukes start flying, you won't see any immigration raids going on. Any parts of a government that does survive will not be interested or able to deport you. A full scale exchange (1,000+ bombs) will lower global temperatures by 15 degrees for a decade. Ironically, that is the exact amount to bring us to 0, which means no more liquid water and no more agriculture. It won't matter what country you move to, you are going to starve all the same. Anyone without a closed loop water and air system and lots of spare parts for their equipment will not last a decade. Even a regional war like India vs Pakistan (100-200 bombs) will kill all growth for a couple years, leading to the death of billions.
Even in a country less likely to be bombed (i.e Canada) a terrorist can still detonate a nuke, so you are not really safe anywhere. If a bomb goes off and you want to survive, have as much dense matter between you and the explosion (harder in an air burst), then you have 10 mins to seal yourself wherever you can and not go outside for 72 hours. Then the danger becomes other people. :/
So I guess the real question is -
do you want to survive? If I knew a nuke was incoming, I'd go outside in direct line of sight - being instantly vaporized is much better than the alternative.
Research:
https://www.imdb.com/title/tt0085404https://www.imdb.com/title/tt0090163