As an immigrant living in Germany i definitely feel uneasy at the prospect of the AfD getting anywhere close to power given their unhinged deportation plans. Then again i also don't trust the mainstream parties to not start copying the AfD's xenophobic policies in hopes of courting their supporters. This has happened before when they did a 180 on their refugee migration policy due to pressure from the right.
With all that said i firmly believe that the collapse of the EU is more important in the global picture than the internal politics of any one country, as it would be a massive blow to US imperialist control in Europe, as well as to Europe's ability to project its own imperialist power in the global south. It also would free the peripheral EU nations which have essentially lost their sovereignty and whose wealth is being massively transfered to the EU core.
So yes, you could take the view that the net benefit to the world would outweigh the downsides and danger to those of us living in Germany who are in a precarious situation should a far right government come to power. However, this entire calculus falls apart if it turns out that they can't or won't go through with this EU exit idea. I for one don't believe the AfD in the slightest when they spout this kind of populist rhetoric.
I think we saw in Italy what Europe's far right populists are like when they come to power. They turn out to be just another bunch of neoliberals who will bend the knee to Washington and Brussels just the same as their centrist counterparts. And right wing governments of Poland and Hungary have frequently polemicized against the EU but for all their harsh complaints they would never actually dare to leave.