I was just thinking, if some Dark wizard succeeded in a Mugglepocalypse - what then?
Are they just some extinct species of animal at that point or do Muggles have some value wizards would lose?
While the total extinction of Muggles may cause wizards some problems, it seems likely that they'll be able to handle any problems it poses.
There would be enough wizards for a minimum viable population so it's likely they'll survive.
The reason the Gaunts were so deformed due to inbreeding is because they limited their choices to pure-blooded British wizards whose families were one of only a few British pure-blood families. Depending on the size of the wizard population they may become inbred like the Gaunts. If the wizarding populations are sufficiently small, they may be unable to avoid inbreeding, and either create offspring with genetic defects, or choose not to reproduce and die off. However, the global wizarding population likely contains enough members to prevent this. The global population of wizards is surely much larger than the number of respected pure-blood wizard families in Britain, and likely is large enough to provide the minimum viable population required to keep them from dying off.
Researchers have studied how many people would be required to create a stable long term population. Some suggest a number of 160 would be enough, but that figure is also questioned often and may not work. A number often cited as the optimal number of people needed to create a viable population without excessive inbreeding is somewhere around 5000. Another study gives a higher number of 10,000 people, which the study says will ensure against both inbreeding and something killing off part of the population. While none of these numbers may be exact, once there are reasonably more wizards than this, it seems highly likely that they will survive. Even at the lowest number given by JKR math, there are more students in Hogwarts than 160, and that's just one school in Britain. The total number of wizards globally is surely much higher.
Humans have survived, and without widespread defects due to inbreeding, with fairly small populations, and until recently, very few ways of accessing other humans too far outside their own place of living. Also, research has shown that human populations were very low at certain points in history. While scientists disagree about the exact numbers, they do agree that the human population was drastically lower, and are saying it may have been as low as 2000 individuals. The highest estimate given in that study for the population was around 10,000 fertile women. Even using that number as a baseline, the global wizarding population would have enough members to meet this requirement as well.
There are at least 100,000 wizards in the world, since that's the number of wizards Arthur Weasley, an employee of the Ministry of Magic, says would be attending the Quidditch World Cup.
“The trouble is, about a hundred thousand wizards turn up to the World Cup, and of course we just haven’t got a magical site big enough to accommodate them all. There are places Muggles can’t penetrate, but imagine trying to pack a hundred thousand wizards into Diagon Alley or platform nine and three-quarters.” - Harry Potter and the Goblet of Fire, Chapter 6 (The Portkey)
That's just the number of wizards who are willing and able to attend the Quidditch World Cup. That doesn't account for wizards who don't care about Quidditch, or were busy, or had other responsibilities, or were too poor to afford going. The number in the total global population of wizards would be therefore at least somewhat higher, likely a large portion higher. After all, even though something like the Super Bowl is a very popular sporting event, only a fraction of Americans attend it.
In addition, Muggles might not be necessary to manage the technology they'd leave behind.
Sure, the Muggles might have created things like nuclear reactors, but while wizards probably wouldn't understand this technology, they could almost certainly dispose of it. They would have no reason to keep it around since they don't use Muggle technology. In addition, they wouldn't have to keep their disposal methods secret or hidden from the Muggles, since they'd be all dead. Wizards wouldn't be able to manage a nuclear power plant, but even if it took multiple wizards working together, they would be able to Evanesco it, or otherwise make it disappear.
Wizards might not expect the problems that unmanaged Muggle technology might bring, but even if they don't, they could likely still handle it. If some disaster starts happening, they could probably take care of it with magic. They'd be able to use the full force of their powers at any disaster they encounter, since they no longer have to be concerned with keeping their magic hidden from anyone. In addition, not all wizards are as unaware of Muggle technology as Arthur Weasley is. All it would take is one wizard (perhaps a Muggle-born like Hermione) who knows about nuclear reactors to tell the others, and get the problem handled.
For one, wizards might go extinct if they did that. There aren't enough wizards for them to survive without Muggles:
“Most wizards these days are half-blood anyway. If we hadn’t married Muggles we'd've died out.”
Harry Potter and the Chamber of Secrets, chapter 7
If Muggles went extinct, that would be a very, very, very, large percentage of the world. It would essentially be removing almost all of the Earth's population. Think about it. Cities would be desolate. Wild animals would start moving around freely and not being kept under check. Creatures like dragons would be able to breed where once Muggles lived, because there would be no one living there. It would essentially be ridding the world of mankind and then the wizards would go extinct as well.
Nuclear disaster would happen, because nobody is there to take care of things. This would cause nuclear fallout all over. This is pretty much a 'what would happen if humans disappeared' question, because once Muggles are gone, wizards won't be far behind.
To address what @Bellatrix said about simply Vanishing the nuclear reactors and stuff - I don't think they know about them. Most wizards have terrible knowledge of the Muggle world - take Archie in Harry Potter and the Goblet of Fire with the Muggle clothing and Arthur Weasly all over the series with knowing nothing about telephones and stuff. I don't think they would realize that things like nuclear reactors would cause problems, simply because they a.) don't know about them b.) don't know what they do.
Harry, Ron and Hermione joined it, right behind a pair of men who were having a heated argument. One of them was a very old wizard who was wearing a long flowery nightgown. The other was clearly a Ministry wizard; he was holding out a pair of pinstriped trousers and almost crying with exasperation. "Just put them on, Archie, there’s a good chap, you can’t walk around like that, the Muggle on the gate’s already getting suspicious –" "I bought this in a Muggle shop," said the old wizard stubbornly. "Muggles wear them." "Muggle women wear them, Archie, not the men, they wear these," said the Ministry wizard, and he brandished the pinstriped trousers. "I’m not putting them on," said old Archie in indignation. "I like a healthy breeze round my privates, thanks."
*Harry Potter and the Goblet of Fire
It is likely that wizards source the majority of their food supply from the muggle population.
Hermione: "Your mother can’t produce food out of thin air, no one can. Food is the first of the five Principal Exceptions to Gamp’s Law of Elemental Transfigura—"
Ron: "Oh, speak English, can’t you?"
Hermione: "It’s impossible to make good food out of nothing! You can Summon it if you know where it is, you can transform it, you can increase the quantity if you’ve already got some..."
I suppose it would just make it much harder for them to operate in general... There aren't really enough wizards to run the whole world and an openly Wizarding community would be hard to keep from tyranny (squibs might be expected to be persecuted)
Also although they don't necessarily need muggles everywhere there are certain items (bread, goods) which are good enough from all sources.
Another opinion might be that industrialization is pointless before magic but it's actually hard to decide since the costs associated with the use of magic in general have never been clearly defined in the books.
Considering that currently, the non magical squibs can simply blend into the Muggle world, it is evident that they'd be ostracized very heavily if there wasn't a sizable population of Muggles.
Indeed it seems more than likely that they'd be treated like slaves or worse than animals as they wouldn't have any sort of technology.
Or alternatively one might suggest that it is possible that Muggles are in some sense the descendants of squibs.
Considering that being a squib is random, unless they were killed off or sterilized it's impossible to prevent the resurgence of muggles.