The countdown to the chocolate apocalypse has begun—or has it? Last November the world was awash in news reports warning that supplies of chocolate will fall behind demand in just five years, with a deficit of one million metric tons. While industry groups debate just how dire the situation will really become, few would disagree that chocolate growers face increasingly challenging times.

For starters, China and India are learning to love chocolate, and demand in these massive markets might be growing at twice the global rate, putting pressure on production. Meanwhile, cacao farmers have to deal with a heavy disease burden. Collectively, the various viruses and fungi that attack trees and their beans lead to production losses on the order of 30 to 35 percent each year, says Andrew Daymond at the International Cocoa Quarantine Centre in the U.K. Throw in climate change, and things get even more chaotic. Analyses by the International Center for Tropical Agriculture (CIAT) in Colombia suggest that some regions of West Africa—the source of most of the world’s cocoa beans—are getting too hot to support cacao trees. If nothing changes, we can expect a decrease in production in coming decades, says Peter Läderach, senior climate change specialist at CIAT.

In response, scientifically backed breeding programs have been developing hardy new cacao trees that are disease-resistant, drought-tolerant and more productive. As clones of these trees roll out across the tropics, farmers should be able to produce more beans while losing less of their crop to environmental problems. These breeding programs are even free of the types of genetic tinkering that some consumers find unsavory: “There are no genetically modified trees on farms,” says Daymond. “It’s a no-go area as far as the industry is concerned.”

But people like Ed Seguine, president of Seguine Cacao Cocoa & Chocolate Advisors, are still worried. In our quest to save chocolate, we may be sacrificing one of its most important attributes: flavor. Like the grocery store tomato, chocolate may still be available when we crave it, but it will taste disappointingly bland.

The effects of this tragedy may not be felt as keenly by most consumers, says Pam Williams, president of the Fine Chocolate Industry Association (FCIA), who contends that mass-market producers have already stopped focusing quite so much on flavor and are opting instead for consistency and price. For commonplace chocolate products, the industry usually opts for beans from cacao tree clones like CCN-51, which was developed 50 years ago by an Ecuadorian breeder. Even under today's challenging conditions, these trees reliably churn out plentiful beans. “Consumers of mass-market chocolate bars … probably won’t notice any taste difference in the future,” says Williams.

But CCN-51 is loathed by most fine chocolatiers for the poor flavor of its chocolate, which Seguine has likened to acidic dirt. Chocolate connoisseurs sometimes like to compare cocoa beans to grapes. Fine wine has subtleties of flavor that are missing from a bottle of two-buck Chuck. Likewise, premium chocolate puts mass-market products in the shade. What’s more, the complexities of flavor in fine cocoa vary from region to region, depending on the genetics of the trees being farmed and the husbandry techniques employed. The floral bouquet associated with some of Madagascar’s chocolate, for instance, contrasts sharply with the spicy version from some parts of Ecuador.

Unless we make the right choices in the years ahead, such flavor profiles may be consigned to history. Many of the most complex cocoa beans come from old and unproductive trees, and the sad truth is that farmers are all too easily tempted to uproot their old stock in favor of more productive but less tasty varieties. Others may give up on chocolate altogether and opt for more lucrative crops such as palm oil or rubber.

“We’re in a crisis, in that those farms that produced the biodiversity—mainly in the Americas—are disappearing,” says Williams. “Really, we’re losing choice daily. It’s very scary.”

Premium chocolatiers are fighting back through projects like the Heirloom Cacao Preservation Initiative—a partnership between the FCIA and the USDA’s Agricultural Research Service. Since 2014, the Initiative has given heirloom status to seven cacao orchards producing particularly flavorsome beans. The hope is that the designation will help farmers—and buyers—recognize the value of those trees for their fine flavor even if they are disease-prone or unproductive by today’s standards.

Other experts suggest that flavor doesn’t have to come at the cost of hardiness and productivity. Wilbert Phillips-Mora is head of the Cacao Genetic Improvement Program at the Tropical Agricultural Research and Higher Education Center (CATIE) in Costa Rica. He thinks that flavor can be included among the selection criteria in cacao breeding programs, and a few years ago he enlisted Seguine’s help to assess the fruits of his scientific labors.

“He sent me hundreds upon hundreds of samples, and I gave him a 'red light, yellow light, green light' simplified notation system,” says Seguine. “Green light says this stuff tastes so good that unless it’s a real disaster disease-wise, you really ought to keep it in the breeding mix. Red light means I don't care if this thing walks on water from disease resistance, this actually tastes bad—get it out. That helped him make his choices.”

By 2009 Phillips-Mora had developed three clones of cacao that were disease-resistant but that also produced beans with a sublime flavor. That year, chocolate from two of these clones beat competition from around the world to win awards at the Cocoa of Excellence program held at Salon du Chocolat in Paris.

“We were very fortunate, because some of the identified disease-resistant parents also have a good quality profile,” says Phillips-Mora. “The possibilities to obtain high-quality individuals within the offspring increased.”

Seguine and Phillips-Mora are continuing their collaboration to produce more disease-resistant and flavor-rich strains. “I’ve got about 60 samples right now, and I owe him another round of red light, yellow light, green light,” says Seguine. The approach has yet to really go mainstream, though. Phillips says a similar attention to flavor has been factored into some breeding programs in western Africa, but on a very infrequent basis.

That means despite their successes, the future of chocolate really does hang in the balance—and not because major production shortfalls will see the popular candy vanishing from shelves. Instead, the real looming disaster concerns the fate of the complex premium chocolate that a relatively small but hugely appreciative number of consumers enjoy.