Mastodon instance Queer.af is shutting down because the country that provides the domain is now ruled by the Taliban.
When registering a country code domain, keep in mind where the domain is being registered. A shift in government or geopolitics can have serious consequences.
It's technically possible, just really, really hard. One example of a successful migration was the transition from calckey.social to firefish.social. It was a massive, extremely difficult undertaking, though.
A big problem involves how user identities are tied to instances. If there were a way to decouple that, I think a lot of the pain goes away.
From what I understand due to the way that Lemmy handles federation, it doesn't (currently?) have a way to handle an instance changing its domain name and still being able to communicate or even an individual user changing their instance and retaining their comments/votes/etc... (this might be more ActivityPub limited since the way Mastodon does it still seems pretty hacky and just a work around for underlying issues).
From a website perspective, yeah, just change some settings and you're good to go and accessible on the web, but that doesn't mean that anything regarding Lemmy is going to actually work.
Sadly, it's more complicated in the Fediverse, because Actor identities are tied to specific domains. If a user moves accounts, they basically send out an update that says "this profile is dead, follow this new account instead", and users automatically switch upon receiving it.
There are three problems:
If your server goes down before you initiate this switch, the change can't actually federate out to your followers. You basically have to build up your follower list from ground zero.
Mass migration is slow, spammy, and inefficient. If we had thought to incorporate some kind of decentralized identifier and relied on that, rather than @user@domain.tld, switching your account to something else could theoretically be more seamless.
Doing this for hundreds or thousands of users is not only a headache, but can be a real strain on servers. It's one thing when a single person does this switch for 3,000 followers: the update is gradually trickled out across accounts, and after a while, the new account is at parity. Doing this with thousands of accounts with thousands of followers is extremely painful.
In a similar fashion, it would be great to find a way to migrate your post history, not just your followers, between one service and another. So far it's possible to request a backup, but only a few services allow importing said backup, let alone import a backup from a different provider (so far only Firefish, Pixelfed and its derivatives allow for the latter).