Great ResignationInflationSupply ChainsLeadership

How Chipotle’s past food crises prepared it for the COVID-19 outbreak

May 27, 2020, 11:00 AM UTC

Subscribe to How to Reopen, our weekly newsletter on what it takes to reboot business in the midst of a pandemic.

Chipotle Mexican Grill is faring relatively well during the COVID-19 pandemic, and it has its traumatic food safety scandals from a few years ago in part to thank.

In 2015, the fast-casual burrito chain dealt with an E. coli outbreak, followed by other food safety problems, that decimated its business for a long time; comparable sales fell by one-fifth the following year.

To win back customers, Chipotle changed how it prepared food—practices that inadvertently readied it for the current pandemic. The protocols included washing hands between every task, putting hand sanitizer at the door, and changing air filtration systems, measures prescribed by the Centers for Disease Control and Prevention, as well as local health authorities, for the current crisis.

“We already had a well-being and a food safety culture in place,” Chipotle chief executive Brian Niccol tells Fortune. Chipotle has also added measures to ensure social distancing, among other newer moves.

That has also had the benefit of giving Wall Street confidence Chipotle could weather the current crisis despite sharp drops in sales. Since Niccol took the reins in March 2018, Chipotle’s shares have more than tripled, passing the $1,000 mark for the first time last week. In 2019, Chipotle’s sales came in at $5.59 billion, 15% more than a year earlier but just short of what it needed to make it onto the Fortune 500 list.

While Chipotle is taking a hit from ongoing lockdowns in many major markets—and millions of Americans are working from home and therefore not patronizing a Chipotle in a business district—the chain is holding its own: Comparable sales, which excludes newly opened or closed stores, fell as much as 35% on weekly basis in late March, but, in April, that had moderated to a drop of a high-teens percentage. Chipotle had been on a tear in January and February with comparable sales up 14%.

Another factor that has helped Chipotle during the COVID-19 crisis has been its app and website, something Niccol made a top priority since taking the helm after a stint as CEO of Yum Brands’ Taco Bell chain.

“That’s how people are going to want to access food and restaurants moving forward,” Niccol says. And that has proved instrumental to the vast majority of restaurants still closed to in-store dining. Right now, some 70% of orders are placed digitally, up from 20% before the crisis, and Niccol thinks that could stabilize around 40% once things normalize.

Chipotle offered free delivery in partnership with Uber Eats, another move that has spurred adoption of the app. “The pivot to having the dining room closed was one that we were flexible and capable of doing because we’d made those investments,” says Niccol.

The loyalty program, largely supported by the app, was launched in April 2019 and now has 13 million members, including 2 million who signed up last month alone. You only have to look at Starbucks’ wildly successful app to see how crucial apps are to hanging on to business while stores are mostly closed. Chipotle’s digital sales crossed the $1 billion threshold last year.

Another key initiative that predates the pandemic but has proved extremely helpful: Chipotle has set up “digital kitchens” to speed up the preparation of online orders, along with mobile pickup shelves. That has meant setting up a separate area at almost all Chipotle restaurants dedicated solely to online orders while in-store orders are prepared before the customer from behind plexiglass separators. For now, both are operating at many stores since most locations allow customers to come in and place an order to go.

Typically, there are seven or eight people on a Chipotle assembly line, but these days it’s more like four. “We can’t have them be shoulder to shoulder right now,” says Niccol.

Even as lockdowns start to ease, and dining rooms reopen, Niccol thinks digital sales will continue to be valuable, offering an alternative to customers wanting to minimize time in the restaurant.

“People will want to get their food and take it to an off-premise location where they feel comfortable,” he says.

At the same time, Niccol says, he senses a desire among customers to be able to eat in again as well, pointing to two customers he spoke to inside a restaurant on a recent visit to an Atlanta-area Chipotle. “They enjoyed having a different place to eat their food than in their car,” he says.

More must-read retail coverage from Fortune: