I realised something odd was happening on a trip to Costco a few weeks ago (it seems a lifetime ago). The warehouse was usually pretty busy, but on this visit checkout queues snaked deep into the store. Toilet roll, hand sanitisers and my favourite beer had sold out. Items were already being rationed. “It’s been a crazy day” said a frazzled but still smiling checkout assistant.

Such trends became increasingly common across the UK, as people took to stockpiling in case of having to self-isolate, and then in preparation for a wider lock-down.

Shelves emptied, and supermarkets restocked as quickly as they could. The government helped by easing restrictions on deliveries, and have allowed stores to cooperate (which previously would have fallen foul of competition laws).

So far there have been no major shortages. ‘There’s enough food for everyone’ has been the key line from store bosses, although this doesn’t mean that those in most need can access food.

In recent years the supply chain for supermarkets has become a lean ‘just-in-time’ system operating on pretty much a three-week model. There isn’t much slack in the system to cope with sudden demand rushes.

But so far the system has just about held up; retailers can see sales as they happen and place more orders. Manufacturers (food and drink is actually the UK’s largest manufacturing sector) have been able to respond quickly and get produce to distribution centres within days.

Further efficiency can be driven by restricting the range of product lines to get more throughput of essential items, and by boosting by output from manufacturers.

But that’s assuming such firms aren’t knocked over by mass illness amongst their workforce – which could seriously hamper the ability of food makers and processors to keep supplies moving, or distribution centres to get products out to places where they are needed.

Planning for a no-deal Brexit was in this sense a useful exercise for retailers and manufacturers to have gone through, and helped prepare them to deal with this surge in demand. For example, in the run up to Brexit deadlines last year, warehouse space across the country was maxed out in anticipation of supply chain disruption in the event of no-deal outcome.

While such Brexit buffer stocks were run down to a degree through 2019, firms have been able to draw on remaining Brexit stockpiles in keeping supply chains running in the current crisis – although that doesn’t mean that the stock is necessarily in the right place.

A major concern is feeding the country’s most vulnerable and isolated people, but there also remains a broader, more strategic issue of whether the UK produces enough of the food that it consumes.

And on that front, the biggest question is labour. The British food system depends to a large degree on a low-cost flexible labour force with a heavy reliance on migrant labour from eastern Europe – 70,000 to 80,000 workers arrive annually with many coming from Romania and Bulgaria – to pick fruit and vegetables.

Some farms were already starting to struggle even before the coronavirus hit. Brexit led to a drop in EU migrant farm labour coming to the UK, and the depreciation in sterling in the wake of the referendum made the UK a less attractive option for migrants. Economic growth in eastern Europe also meant that workers preferred to stay at home, or nearer to home, to find work.

Today such labour shortages are exacerbated by travel restrictions and a fear of becoming ill, keeping potential migrants at home. Similar issues affect agriculture in France and Germany, but in the British case Brexit hasn’t helped farmers in that it has effectively choked off part of the supply of labour.

With the harvest season starting, growers have been looking for staff laid off in, for example, hospitality, to help harvest fruit and veg. The environment secretary, George Eustice has stressed the “the critically important issue of seasonal workers, who usually come from Europe to pick fruit and vegetables. We need to mobilise the British workforce to fill that gap”.

More broadly, sectors like automotive have shut down of late, amidst a collapse in demand, supply chain disruption, and the need to keep workers safe. The latest forecasts from the Society of Motor Manufacturers and Traders (SMMT) suggest a fall in production of 200,000 units for the year. But that may be a best (or least worst) case scenario if shut downs continue beyond a month.

That’s pretty disastrous for an industry that was already under considerable pressure given Brexit uncertainty and the shift away from diesels, and given the need to invest heavily in new technologies. A major cash squeeze in the industry is inevitable, as evidenced by Ford recently cancelling dividends and drawing down some $15bn in credit lines.

Here in the UK, there is a fear as to how much of the auto industry will actually survive the crisis. The chief executive of the SMMT, Mike Hawes, hit the nail on the head when he said that the auto industry stands “on the precipice”.

The shut downs will weaken auto makers and push them further to merge and consolidate. Auto firms will review investments, and which models they produce where. That poses further big questions over the position of some UK plants which already face uncertainty over the nature of the UK’s trading relationship with Europe at the end of 2020.

UK auto was already weakened in part by Brexit uncertainty, and may suffer if cash-starved auto firms look to rationalise production in the wake of the coronavirus.

Overall Brexit seems to have both helped and hindered businesses in dealing with the economic effects of the coronavirus. It has helped in some ways, notably in stress testing supply chains and stockpiling, which retail firms have been able to draw on.

But it has hindered in terms of reducing the supply of migrant labour in sectors like agriculture and stalling investment and output in sectors like auto, leaving the latter vulnerable to post crisis rationalisation.

By Professor David Bailey, senior fellow at the UK in a Changing Europe.