The invention of the chilled packaged sandwich, an accessory of modern British life which is so influential, so multifarious and so close to hand that you are probably eating one right now, took place exactly 37 years ago. Like many things to do with the sandwich, this might seem, at first glance, to be improbable. But it is true. In the spring of 1980, Marks & Spencer, the nation’s most powerful department store, began selling packaged sandwiches out on the shop floor. Nothing terribly fancy. Salmon and cucumber. Egg and cress. Triangles of white bread in plastic cartons, in the food aisles, along with everything else. Prices started at 43p.

Looking upon the nation’s £8bn-a-year sandwich industrial complex in 2017, it seems inconceivable that this had not been tried before, but it hadn’t. Britain in 1980 was a land of formica counters, fluorescent lighting and lunches under gravy. Sandwiches were thrown together from leftovers at home, constructed in front of you in a smoky cafe, or something sad and curled beneath the glass in a British Rail canteen. When I spoke recently to Andrew Mackenzie, who used to run the food department at M&S’s Edinburgh store – one of the first five branches to stock the new, smart, ready-made sandwiches – he struggled to convey the lost novelty of it all. “You’ve got to bear in mind,” he said. “It didn’t exist, the idea.”

If anything, it seemed outlandish. Who would pay for something they could just as easily make at home? “We all thought at the time it was a bit ridiculous,” said Mackenzie. But following orders from head office, he turned a stockroom into a mini production line, with stainless steel surfaces and an early buttering machine. The first M&S sandwiches were made by shop staff in improvised kitchens and canteens. Prawns defrosted on trays overnight, and a team of five came in before dawn to start work on the day’s order.

And, oh, they sold. They sold so fast that the sandwich experiment spread from five stores to 25, and then 105. Soon, Mackenzie was hiring more sandwich makers in Edinburgh. In the Croydon branch, a crew of seven was making a hundred sandwiches an hour. The first official M&S sandwich was salmon and tomato, but in truth it was a free-for-all. They sold so fast that staff made them out of whatever was lying around. In Cambridge, they made pilchard sandwiches, and people wanted those, too.

Without being designed to do so, the packaged sandwich spoke to a new way of living and working. Within a year, demand was so strong that M&S approached three suppliers to industrialise the process. (One of the world’s first sandwich factories was a temporary wooden hut inside the Telfer’s meat pie factory in Northampton.) In 1983, Margaret Thatcher visited the company’s flagship store in Marble Arch and pronounced the prawn mayonnaise delicious.

Every supermarket jumped on the trend. Up and down the country, chefs and bakers and assorted wheeler-dealers stopped whatever they were doing and started making sandwiches on industrial estates. The sandwich stopped being an afterthought, or a snack bought out of despair, and became the fuel of a dynamic, go-getting existence. “At Amstrad the staff start early and finish late. Nobody takes lunches – they may get a sandwich slung on their desk,” Alan Sugar told an audience at City University in 1987. “There’s no small-talk. It’s all action.” By 1990, the British sandwich industry was worth £1bn.

Illustration: Pete Gamlen

A young economics graduate named Roger Whiteside was in charge of the M&S sandwich department by then. As a young buyer, Whiteside had come up with the idea of a set of four peeled oranges, to save customers time. He had read that apartments were being built in New York without kitchens, and he had a sense of where things were going. “Once you are time-strapped and you have got cash, the first thing you do is get food made for you,” he told me. “Who is going to cook unless you are a hobbyist?”

In the sandwich department, he commissioned new prototypes every week, and devised an ultimately impractical scheme to bake baguettes in west London each morning and deliver them, still crusty, to stores around the capital. Baguettes go soft when they are refrigerated – one of a surprising number of technical challenges posed by sandwiches. Whiteside immersed himself in questions of “carriers” (bread), “barriers” (butter, mayonnaise), “inclusions” (things within the bread), “proteins” (tuna, chicken, bacon) until they bordered on the philosophical. “What is more important, the carrier or the filling?” he wondered. “How many tiers of price do you offer in prawn? How much stimulation do people need?”

In the early 90s, Whiteside developed M&S’s first dedicated “food to go” section, with its own tills and checkouts, in Manchester. The innovation prefigured the layout of most contemporary supermarkets, and was fabulously successful. But it wasn’t successful enough for Whiteside. He didn’t understand why absolutely everyone in Manchester city centre wasn’t coming in to M&S for their lunch.

One day, he went into a branch of Boots on the other side of the street. Like almost every major retail chain, the pharmacy had followed M&S into the sandwich business. (Boots established the country’s first national distribution system – selling the same sandwiches in its all branches – in 1985, and pioneered the meal deal.) But Whiteside was convinced that its sandwiches weren’t as good as M&S’s, and that most customers knew that, too. He confronted the lunchtime queue in Boots and asked people why they weren’t coming to his store. “They said: ‘Well, I am not crossing the road’,” he recalled.

The answer struck Whiteside with great force. Mass-producing a meal that you could, if necessary, rip open and consume in the street was transforming people’s behaviour. “Instant gratification and total convenience and delivery,” Whiteside said. “If you are not there, they are not going looking for you.” He returned from Manchester and tried to persuade M&S to open hundreds of standalone sandwich shops in London. “It was so obviously an opportunity.” M&S didn’t go for the idea, but Whiteside was convinced that the future would belong to whoever was selling on every corner. He saw Pret and Starbucks and Costa and Subway coming a mile off. During the 1990s, the sandwich industry trebled in size. By the end of the 20th century, more people in Britain were making and selling sandwiches than working in agriculture.

If you have been eating a packaged sandwich while reading this, you will have probably finished it by now. One industry estimate says that, on average, they take 3.5 minutes to consume. But no one really knows, because no one pays attention. One of the great strengths of the sandwich over the centuries has been how naturally it grafts on to our lives, enabling us to walk, read, take the bus, work, dream and scan our devices at the same time as feeding ourselves with the aid of a few small rotational gestures of wrist and fingers. The pinch at the corner. The sweep of the crumbs.

But just because something seems simple, or intuitive, doesn’t mean that it is. The rise of the British chilled sandwich over the last 40 years has been a deliberate, astonishing and almost insanely labour-intensive achievement. The careers of men and women like Roger Whiteside have taken the form of a million incremental steps: of searching for less soggy tomatoes and ways to crispify bacon; of profound investigations into the molecular structure of bread and the compressional properties of salad. In the trade, the small gaps that can occur within the curves of iceberg lettuce leaves – creating air pockets – are sometimes known as “goblin caves”. The unfortunate phenomenon of a filling slumping toward the bottom of a sandwich box, known as a skillet, is “the drop”. Obsessed by perfection and market share, the sandwich world is, unsurprisingly, one beset by conditions of permanent and ruthless competition. Every week, rival sandwich developers from the big players buy each others’ products, take them apart, weigh the ingredients, and put them back together again. “It is an absolute passion,” one former M&S supplier told me. “For everybody. It has to be.”

The homeliness of the sandwich has been able to mask its extraordinary effectiveness as a commercial product. In 1851, the Victorian social commentator Henry Mayhew calculated that 436,800 sandwiches, all of them ham, were sold on the streets of London each year. That might sound a lot, but Sainsbury’s, which currently accounts for around 4% of the UK “food to go” market, now sells that number every 36 hours. “It is sometimes hard to tell how much has changed with our sandwich consumption, because we feel really nostalgic towards them,” Bee Wilson, the food writer, told me. “But actually, eating sandwiches five days a week, as lots of people do now, or even seven days a week – that is what has changed. They have invaded every area of our lives.”

And yet the sandwich is not satisfied. You might think that, in a nation that buys around 4bn a year, and in which you have been feeling better since you stopped eating so much bread, that the market might be saturated, or even falling off a little. But that is not the case. According to the British Sandwich Association, the number grows at a steady 2% – or 80 million sandwiches – each year. The sandwich remains the engine of the UK’s £20bn food-to-go industry, which is the largest and most advanced in Europe, and a source of great pride to the people who work in it. “We are light years ahead of the rest of the world,” Jim Winship, the head of the BSA, told me.

British sandwich-makers are sought-after across Europe, and invited to places like Russia and the Middle East to advise on everything from packaging and production lines to “mouth feel” and cress. “In Saudi Arabia they absolutely love the story of the Earl, the scoundrel,” one factory owner told me. And during weeks of reporting for this article, I didn’t come across one person who doubted that the long boom would continue for years to come. “It’s big. We all do it. And we do it a lot, is our summary of the market,” said Martin Johnson, the chief executive of Adelie Foods, a major supplier of coffee shops and universities.

Part of what pushes the industry forwards is the maddening fact that we continue to make so many sandwiches at home – an estimated 5bn a year. “The biggie is still the people who aren’t buying,” Johnson told me. The prize that seemed so unlikely in 1980 – the industrialisation of something as scrappy as the sandwich – is now almost a provocation to people who dedicate themselves to the food-to-go concept.

After all, every sandwich you make at home is one they have not sold. When you talk to people in the business, they will invoke the inventory problems faced by ordinary households in supplying enough variety in salads and breads. They are also aware that, barring a dramatic change in our circumstances (around 2009, following the financial crisis, there was a brief but noticeable fall in the sale of shop-bought sandwiches), people who start eating on the move don’t look back. When I dropped by the development kitchens at Sainsbury’s a few weeks ago, there was an Oakwood smoked ham and cheddar sandwich – the supermarket’s bestseller – sitting on the table. “Twenty thousand people a day used to make a ham and cheese sandwich,” said Patrick Crease, a product development manager. “Now this is their ham and cheese sandwich.” I don’t know whether he meant to, but he made this sound somehow profound and irreversible. “There are 20,000 variants that don’t exist anymore.”

More fundamentally, though, the sandwich has proven itself to be uniquely adaptable to our time-pressed, late-capitalist condition. In her 2010 book about sandwiches, Wilson wrote that the best way to understand it was not to think about it as food wrapped in bread, but as a form of eating – functional and transitory – that reflects how we live now. “Sandwiches freed us from the fork, the dinner table, the fixed meal-time,” Wilson wrote. “In a way, they freed us from society itself.”

A Pret A Manger kitchen in central London. Photograph: Jonathan Player/Rex/Shutterstock/Alamy

Sandwich people seek to know more about us than we know about ourselves. They spend just as much time thinking about our habits and frailties as they do thinking about what we want to eat. Starbucks knows you are more likely to have a salad on a Monday, and a ham and cheese toastie on a Friday. Sandwich factories know that our New Year’s resolutions will last until the third week of January, when the BLT orders pick up again. Clare Clough, the food director of Pret a Manger, told me that the company can predict years in advance, if necessary, its busiest day for breakfast sandwiches: the last working Friday before Christmas – office party hangover morning – which this year falls on 15 December. “We can tell you now how many we are going to do,” she said.

The most obvious – and ambitious – plot of the sandwich industry is to make us eat them throughout the day. People in the trade, I noticed, rarely talk about breakfast, lunch or dinner. They speak instead about “day parts”, “occasions” and “missions”, and any and all of these is good for a sandwich. In 2016, the British public carried out an estimated 5bn food-to-go “missions”, and these are spread ever more evenly across the day parts. In recent years, the biggest development in the sandwich business has been its successful targeting of breakfast. (The best-selling filling of the last 12 months has been bacon.) And the next frontier, logic dictates, is dinner – or, as it was described to me at Adelie Foods, “the fragmentation of the evening occasion”.

Whiteside, the former Marks & Spencer sandwich man, is one person who believes that the industry can take on the night. He left M&S in 1999, after 20 years, and helped to found Ocado, the online supermarket. In 2013, Whiteside became the chief executive of Greggs, the UK’s largest bakery chain, where he has overseen a radical expansion and simplification of the business – opening hundreds of new stores, drive-throughs and a delivery service. Last month, he told me that he sees the hot sandwich as the key to making Greggs “more appealing in the evening day part”. If you want people to eat a sandwich on their way home, give them something warm. We were sitting in a small meeting room on the second floor of Greggs’s corporate headquarters, on the edge of Newcastle. “Think about it,” said Whiteside. “A burger is a hot sandwich, isn’t it?” He seemed pleased by this, the intimation of another day part to conquer. “Sandwiches,” he said, “never sit still.”

The revolutionary possibilities of the sandwich have always been well hidden by its sheer obviousness. The best history, written by Woody Allen in 1966, imagines the conceptual journey taken by the fourth Earl of Sandwich 200 years earlier. “1745: After four years of frenzied labour, he is convinced he is on the threshold of success. He exhibits before his peers two slices of turkey with a slice of bread in the middle. His work is rejected by all but David Hume, who senses the imminence of something great and encourages him.”

Scholarly attempts to isolate the precise moment of incarnation – the first stack – mostly read like other parodies. There is some theorising around “trenchers”, thick hunks of bread that served as plates in the Middle Ages, and overwrought interpretations of Shakespeare’s references to “bread-and-cheese”; while everyone acknowledges the long history of flatbreads and their fillings in southern Europe and the Middle East. For this reason, there is strong interest in the Earl’s tour of the Mediterranean as a young man in 1738-39, but unfortunately he made no mention of the pitta bread or the calzone in the detailed journal that was published after his death.

The first definite sandwich sighting occurs in the diaries of Edward Gibbon, who dined at the Cocoa Tree club, on the corner of St James Street and Pall Mall in London on the evening of 24 November 1762. “That respectable body affords every evening a sight truly English,” he wrote. “Twenty or thirty of the first men in the kingdom … supping at little tables … upon a bit of cold meat, or a Sandwich.” A few years later, a French travel writer, Pierre-Jean Grosley, supplied the myth – beloved by marketing people ever since – that the Earl demanded “a bit of beef, between two slices of toasted bread,” to keep him going through a 24-hour gambling binge. This virtuoso piece of snacking secured his fame.

John Montagu, the fourth Earl of Sandwich, in a 1739 painting by George Knapton. Photograph: Alamy

The evidence for this, though, is weak. In his definitive biography, The Insatiable Earl, published in 1994, NAM Rodger concludes that Sandwich was hard-up, and never wagered much for a man of his rank. A large, shambling figure, prone to breaking china, the Earl ran the Admiralty, by most accounts badly, for a total of 11 years. He lived alone after his wife went mad in 1755. Visitors to his house remarked on the poor quality of the food. “Some of his made dishes are either meagre or become absolutely obsolete,” said his friend, Lord Denbigh. The likely truth is that the entire future of the sandwich – its symbiotic relationship with work, its disregard for a slower, more sociable way of eating – was present at its inception. In 18th-century English high society, the main meal of the day was served at around 4pm, which clashed with the Earl’s duties at the Admiralty. He probably came up with the beef sandwich as a way of eating at his desk.

The fad was soon unstoppable. Louis Eustache Ude, the chef d’hotel to the Earl of Sefton, acknowledged the power of new format in his cookbook of 1813. A generous spread of sandwiches “of fowl, of ham, of veal, of tongue, &c., some plates of pastry and here and there on the table some baskets of fruit” – a textbook food-to-go offering, in other words – could cut the costs of a dinner and dance by three quarters. But it was demeaning, too. Chef Ude did his best to refine the craze, suggesting bechamel as a barrier and urging “extraordinary care” in the trimming of salad, but you can sense in his words the frustration that he has been reduced to this. “Of all things in the world, sandwiches have least need of explanation,” he wrote. “Everyone knows how to make them, more or less.”

It takes a certain type of mind to really innovate between two pieces of bread. Isabella “Mrs” Beeton arguably designed the first avant-garde sandwich, in 1861, with her “Toast Sandwich” – a piece of toast, seasoned with salt and pepper, between two pieces of bread – but for most of the 19th and 20th centuries, the sandwich was what it was. Crustless fingers for the rich; what one cookbook called “mouth distorters” for the poor. In postwar Britain, in particular, the sandwich – bread dry after hours on display, a sad mess inside – came to express a kind of culinary hopelessness. “It is by eating sandwiches in pubs on Saturday lunchtimes that the British seek to atone for whatever their national sins have been,” wrote Douglas Adams in 1984.

The M&S breakthrough arrived on high streets populated by mostly featureless sandwich bars. Slow service. Bins of fillings of indeterminate age. “It was a depressing situation,” Julian Metcalfe told me. “Ninety per cent of them were depressing places.” Metcalfe opened the first branch of Pret a Manger, at 75b Victoria Street, in London, during the summer of 1986. He was 26 years old. He had been running a delicatessen in Putney, but it had no kitchen, and Metcalfe was dismayed by what he was forced to sell. “We were delivered coleslaw with a 16-day shelf life,” he recalled. “I remember thinking: ‘Goodness.’” With a university friend, Sinclair Beecham, Metcalfe decided to open a delicatessen-cum-sandwich shop in Westminster.

The first Pret was a mess of salads, cured meats, cheeses and sandwiches that Metcalfe made in the back. When I asked him how he came to settle on sandwiches, he said: “Because they sold better than ham. Slicing ham took for ever.” Metcalfe, who is by temperament impatient, concentrated on trying to serve customers in a minute or less. “We started by selling the obvious sandwiches,” he said. “Cheese. And I realised, why can’t we do leg of lamb with mint?”

Metcalfe was unleashed. He roasted chickens until 1am, and stripped off the meat with his hands. A supplier pitched him a small freshwater lobster, called a crayfish. He was mad about rocket. A Pret a Manger sandwich cookbook, published in 1996, retains the zany air of experiment: lamb, redcurrant jelly and aubergine; goats cheese, pink peppercorns, tomatoes. The formula didn’t come easy. It took Metcalfe and Beecham four years to open their second shop, on Bishopsgate, in the City of London. When they did, they played opera at full blast to accompany the sandwiches. “It was preposterous,” said Metcalfe. “But it worked.”

Two doors down from the original Pret, there used to be another sandwich shop, called French Franks, which concentrated on the filled croissant – itself a daring concept at the time. Frank Boltman, who is not French, watched the Pret boys with wonder. “It was make six, sell six. Little but often. It is the same way it works now,” he said. “They were constantly selling fresh product, which is beautiful.”

Boltman had nine branches of French Franks by the early 1990s, but he could not keep up with Pret a Manger. Pret will open its 500th branch next year, and is currently valued at £1.4bn. (Metcalfe sold most of his stake in 2008.) But Boltman still knows a thing or two. A small man with a husky voice and a moustache that he smooths as he talks, he won four consecutive sandwich designer of the year awards – at the BSA’s fiercely contested “Sammies” – between 2009 and 2012.

“My idea of relaxation is to write down five new sandwiches,” he said when we met recently at his latest baby, a vaguely hipsterish place called Trade, on the Essex Road in north London. The quest of the sandwich inventor is a mostly pitiless one. The industry has its own 80:20 rule: 80% of sales come from 20% of the flavours. These are often referred to as “the core” – the egg mayonnaise, the BLT, the chicken salad – and they are as familiar as our own blood. Pret’s best-selling sandwiches (the top three are all baguettes: chicken caesar and bacon, tuna and cucumber, cheddar and pickle) have not changed for seven years. M&S’s prawn mayo has been its No 1 for 36.

Undaunted by this, Boltman starts out by choosing the bread, and the ingredients from those he is already using on his menu. The art of the sandwich designer is to think inwards, to find variations within a known and delineated realm. “It is a question of using tenacity, knowledge, know-how, flair,” said Boltman. People in the industry talk about seminal new combinations – Pret’s crayfish and rocket; M&S’s Wensleydale and carrot chutney – like Peter Brook’s Midsummer Night Dream, or Zeffirelli’s Romeo and Juliet. The story comes alive again. Someone finds a new move in chess.

It is possible to be a showman. Boltman talked about a chicken and broccoli bun he made in the 80s. “Granary seeded roll as a vehicle,” he said. “Unbelievable.” While we were talking, the kitchen made me Boltman’s interpretation of the Reuben, which he sells for £8.50. I hadn’t eaten that morning, and the pastrami, which had been cured for a week, lay deep. The taste of caraway seeds in the rye bread lingered in the roof of my mouth. “Did the secret sauce come through?” he asked.

Boltman has been round the block a few times. He had a McDonald’s franchise for a while. He observed that, even as sandwiches function as an accelerant of our harried, grinding lives, they also offer a moment of precious, private escape. “People want to eat,” he said, leaning close. “They want comfort. They want solace. I’ve had a shit morning. I’ve fallen out with my boss. I’ve had a fucking horrible journey in. A poxy lettuce-and-whatever concoction in a plastic bowl is not going to do it for me. I want a cup of tea, a chocolate biscuit and I actually want to cry. I am going out for a fucking sandwich.”

After the rapid growth of the 1980s and 1990s, the sandwich industry consolidated. Appropriately enough, it consists of two sides: the specialist chains like Subway, Greggs and Pret a Manger, where the thing is assembled fresh in the shop; and the network of factories, spawned by M&S, that work through the night and supply supermarkets, high-street coffee bars, prisons, airlines, hospitals and everybody else. Among the sandwich chains, the bigger brands – with economies of scale and better locations – prospered. Subway, the US giant, which opened its first UK store in Brighton in 1996, now has 2,500 branches, and is the largest fresh-assembly operation in the country, with Greggs not far behind.

On the factory side, there was a wave of mergers and acquisitions, as companies sought sufficient production capacity to be able to supply Tesco, or Waitrose. These days, two firms, Greencore and 2 Sisters, loom above the rest, supplying well over half of the UK’s factory-made sandwiches between them – perhaps a billion a year. Greencore, which grew out of Ireland’s former state-owned sugar beet industry, has eight facilities in Britain and a large US business, and claims to be the largest sandwich maker in the world. Greencore and 2 Sisters routinely sweep the BSA’s technical awards, for their innovations in thawing prawns and washing salad. Neither allowed me to visit. (2 Sisters Food Group was recently the subject of a Guardian/ITV investigation into its processing of supermarket chicken.)

Large-scale sandwich making is fearsomely complicated and operates on tiny profit margins. As a result, it is secretive. “It’s totally crazy,” Rachel Collinson, the former commercial director of a plant in Northampton that was acquired by Greencore in 2011, told me. Collinson helped push through the introduction of the cardboard skillet, which was designed for Pret in 1999, and became widespread throughout the industry in the 2000s. On any given morning, her factory would receive 800 different ingredients, which it would turn into 250,000 sandwiches by the early afternoon. “I have worked in nearly every single food category,” she told me. “There is nothing like sandwiches. It’s super-fast, super-fresh. It’s the leading edge.”

On a grey morning last month, I was invited to see the sandwich assembly lines at Adelie – a £300m food-to-go manufacturer – at Wembley, in north-west London. Like many wholesalers, Adelie is reluctant to name its clients, for fear of ending the illusion that most supermarkets and high-street brands still make their own. The factory manager was Azzeddine “Abdul” Chahar, a 48-year-old former police detective from Algiers, who fled the country’s civil war in 1993. Chahar has been making sandwiches ever since, although he sometimes gets funny looks when he tells friends back home what he does. Algerians, like many people around the world, regard the sandwich as inferior fast food, because it is cold. “Even today,” he shrugged. He tries to persuade his teenage daughter to have a decent meal at school, but most mornings she makes him buy her a sandwich on the way. “It’s a quick lunch. Pick up and go,” Chahar said. “There is no time in the UK. You know that.”

We put on wellington boots, white coats and hairnets, and washed our hands three or four times. Dressing to enter a sandwich factory is a bit like preparing to perform surgery on a horse. Chahar showed me corridors stacked high with specialised brown bread (which must be perfectly square), cold storage with six days’ supply of cheese, and a room with 22 different mayonnaises. In 2010, Raynor Foods, a small family-owned factory in Chelmsford, introduced the Intense tomato, a plum tomato with thicker cell walls that help retain moisture. It has become the industry standard. The tomato was originally designed by a subsidiary of Bayer, the German pharmaceuticals corporation, for use in pizza toppings, and has dramatically reduced the incidence of soggy sandwiches. But it is sometimes hard to come by. Chahar spotted a crate. “The suppliers were struggling to find them last week,” he groused.

In the main production hall, which had a red floor and a thrumming air supply – keeping the temperature a steady 10C – a couple of hundred workers lined seven conveyor belts. Chahar took me to the middle of the room, where around a dozen women were making one of Adelie’s newest lines, a chicken tikka and onion bhaji sandwich, which is popular among students. The belt was going at about 33 sandwiches a minute, so the woman at each stage – arranging the 40g of chicken, dolloping and spreading out the bhaji paste, sprinkling on 3g of coriander – got less than two seconds before they went past.

A person known as the “stacker” then put two sandwiches on top of each other and fed them into the Grote AC60 ultrasonic cutting machine. Chahar and I drew close. A tiny whine emanated from the titanium blade, which was vibrating 20,000 times a second and making perfect triangles. Ultrasonic cutters were designed to slice faultlessly through chocolate and cheese. “It can cut through,” murmured Chahar. “You will not feel the pain. Trust me.”

Over the years, Chahar has tried to get unemployed British people to join his sandwich lines. “They come here. They do half day. They never come back,” he told me. (Adelie has also made similar, largely unsuccessful attempts with ex-convicts.) The work is too cold, and too repetitive. Pay at the Wembley factory starts at £7.50 an hour. As a result, most sandwich factories have relied on immigrant labour for at least a decade; in 2014, the news that Greencore was recruiting in Hungary prompted an infamous Daily Mail headline, which asked: “IS THERE NO ONE LEFT IN BRITAIN WHO CAN MAKE A SANDWICH?” According to the BSA, about 75% of people in the sandwich and cafe sector in the capital are from overseas; in the rest of the country, it’s 40%. For Chahar, who dreams of introducing the sandwich to Algeria, it is a baffling situation. “The British people needs to get into this job. It is the sandwich,” he said. “They should be proud.”

Photograph: Alamy

The decision to leave the EU, then, is proving extremely awkward for our national cuisine. In theory, Britain’s freshly-made sandwich sector, with its world-leading technology and expertise, could be on the brink of spreading lucratively around the world. In fact, since last June, it has been assailed by rising food prices and unnerving questions about who – or what – is going to make the damn things in the future. “Brexit has fucked everything up,” one chief executive, whose firm relies heavily on eastern European labour, told me. “On the day after the vote, on that Friday, people are walking up to me and saying, ‘Do I go home now?’ These are the people who dug us out of a hole when the indigenous population failed.”

When I met Jim Winship, of the BSA, he sketched an unhappy picture of the nation’s sandwich infrastructure falling apart. “You take the workforce away and the Costas of this world can’t function,” he said. “If they start closing down and retracting, that is going to have a knock-on effect.” The sandwich industry, Winship pointed out, doesn’t merely sustain hundreds of thousands of jobs, it also produces billions of pounds of added productivity throughout the economy. “It allows people to carry on working over lunch,” he said.

At Adelie, the CEO, Martin Johnson, who worked at BMW and Ford earlier in his career, was more circumspect. But he observed that Brexit is likely to hasten the arrival of robots on the sandwich line. “One of the things you can do is be less dependent on labour,” he said. Down on the factory floor, Chahar showed me a new high-tech filling depositor – a shiny metallic cone – that the company was trying out. “The idea is to move to automation as much as you can,” he said. Blobs of egg mayonnaise dropped precisely on to slices of white bread from about a foot above the conveyor belt. A lone woman spread the sandwich mix with a spatula in each hand. I looked up and down the line. There were only four people on it, compared to eight or nine on all the rest. The completed sandwiches seemed to travel a long time on the belt without any human intervention. At the far end, the stacker readied them for the slicer. She caught my eye and smiled.

The steady, relentless expansion of the sandwich empire – the colonisation of new day parts – is not a phenomenon that draws attention to itself. Over two days in late September, I attended Lunch!, the food-to-go industry’s annual trade show at the Excel centre in east London, and the sandwich was conspicuous by its absence. Instead there were 300 or so exhibitors hawking fruit crisps, tofu from Devon and chickpea puffs. A graph supplied by the organisers more or less explained why. Together, sandwiches, wraps and baguettes accounted for more than a third of all the food we bought at lunchtime in 2016. Add burgers and the proportion rises to 40%. The only other items that came close were crisps, chips and chocolate bars. Salads made up 3.5% of our lunches. Sushi didn’t make the top 10.

The sandwich has nothing to prove. Whether it wanted to or not, pretty much everything else at Lunch! – the nut shots, the sun-dried bananitos (small bananas from Thailand), the gluten-free, dairy-free, sugar-free chai lattes, the coconut teriyaki jerky, the chocolate-flavoured insects and the cactus water – was vying for the chance to be picked up as an accompaniment to the main event. The packaging stands were the same. A man called Ewald showed me a new, lightweight German baguette wrapper that zips off halfway down and is selling like crazy in the Benelux countries and Argentina. “It’s a wow effect, ja,” he said, stripping off the top half of a seeded bun.

To find the sandwich action, you had to know where to look. Upstairs, in an executive suite, officials from the British Sandwich Association were overseeing a quiet contest to find fillings for the Croll – a croissant crossed with a roll – which is an invention of the New York Bagel Company. At a hotplate, a young development chef was working on a Croll D’hollandaise.

At the fair, I would occasionally glimpse the name of a big player – a Pret, a Greencore, a Tesco – on a delegate badge going past. They were there, watching the trends, and each other. This year, Lunch! was all about proteins and vegetarianism. Giving up meat for a day or two a week, or going vegan for a bit – a millennial tendency known as “flexitarianism” – is a big deal in the food-to-go industry. Pret a Manger opened its first vegetarian shop in central London last summer, and now has three in the capital. In January, M&S will launch a range of vegan sandwiches on bright red, green and yellow vegetable-based breads.

In the centre of the hall, I came across the Soho Sandwich Company, an upmarket supplier, which, I learned, provides sandwiches to the Guardian canteen. Dan Silverston, the managing director, showed me its new TLT – a vegan BLT made with tofurkey. “That’s cool,” he said. “That’s on point. That’s on trend.” Frank Boltman ambled up. He gazed at the stands of pitta breads, exotic botanicals and pre-mixed salads surrounding us. “Take away the food,” he said, “and it’s just a war.”

Every half an hour, speakers would appear on two stages on opposite sides of the hall. A branding person from Leon spoke in front of slides that said: “Kombucha”, “Gut health”, and “Be storytellers”. On the Friday morning, a huge crowd gathered for a talk by Roger Whiteside, the former Marks & Spencer executive now running Greggs. When Whiteside took over, the business was struggling. A high-street baker for 70 years, Greggs hadn’t found a way to adapt to the fact that 80% of its customers wanted something to eat immediately. Over the last four years, and in his matter of fact way, Whiteside has turned Greggs from a baker that also sold sandwiches (Greggs has done a solid line in baguettes since 1988) into a pure food-to-go company. Profits have risen by 50%.

Sitting on a stool at Lunch!, Whiteside took questions from the audience about rising food prices and the importance of coffee to unlocking the morning day part. Whiteside, who is 58, was on his way back up to Newcastle, where Greggs is based, and he enjoyed playing the northern realist to the southern flexitarians. The average spend in Greggs, Whiteside pointed out, is £2.85. “Can we ever imagine selling quinoa in Sunderland?” He mused. “If we can, we will.” Everybody clapped.

A few weeks later, I travelled up to Newcastle to see him. When I asked Whiteside to explain the rise of the sandwich that he has witnessed throughout his career, his answer acknowledged in part the pressured lives of the population it feeds. “When you talk to people, if they are honest, a large number of people eat the exact same sandwich every single day, all their life,” he said. Even as it facilitates a faster and more solitary life, the sandwich provides a kind of security. We seek it out because we have enough to contend with as it is. “People don’t want to be disappointed,” said Whiteside. And in a way, that is the very British secret of a very British industry. The sandwich is a national pastime of modest expectations, remorselessly fulfilled.

Before I left, Whiteside wanted to tell me about the hot sandwiches that he hopes will break open the evening day part. In their way, the new evening sandwiches, which Greggs is calling “street food”, sound as unlikely as the M&S packaged sandwich did in 1980. “There are a high number of sandwiches eaten at night, actually,” Whiteside observed. “If you talk to customers, a lot of them eat sandwiches when they get home because they can’t be bothered to make anything else. It’s what they’ve got. So they make a sandwich.”

A few minutes later, I was taken to Greggs’s “food zone”, on an industrial park a short drive away. Kate Jones, the product development manager, showed me three flavours of the new street-food sandwiches under a heat lamp. I took a bite of one of the new sandwiches: barbecue chicken with a Korean barbecue sauce, served on a baguette. The filling was warm and sweet, and it stuck to my teeth. Greggs has developed a new bacon-flavoured mayonnaise as a garnish. “Strategically,” said Jones, “we are going to make sure we have the appropriate offer for any time of the day.”

• Follow the Long Read on Twitter at @gdnlongread, or sign up to the long read weekly email here.