Factories are ancient, older than capitalism. Imagine a weaver in Mesopotamia who hires workers, provides them with tools and raw material (the capital). This entrepreneur would be recognised by Karl Marx himself as a “capitalist” since he derives “surplus value” from selling the cloth. Yet no one would say that Mesopotamia was capitalist, even though there were 13,200 weavers in its main city, Ur. In 15th-century Florence, over a third of the workforce produced wool for wages. The wool would be imported from England or Spain, and then sold all over Italy, the Balkans and the Levant, but no one has ever argued that the industrial revolution started in Florence.

The typical unit of production remained the small workshop run by a single artisan helped by apprentices, using simple tools. Big factories, the “behemoth”, whose history is delineated ably by Joshua Freeman in his fine book, are a recent invention. They started in Great Britain in the 18th century, although the majority were small.

The factory system grew out of a new product, cotton, at a time when Europeans wore wool or flax, and silk if they were rich. Cotton was linked to trade because it could not grow in Europe. So large factories went together with empires, colonies and slave plantations – in other words, with globalisation. Increase in production required not only innovations such as the spinning machine but also co-ordinating the activity of dozens or hundreds of workers who were expected to start at the same time, day in, day out. And since workers did not own clocks, bells announced the beginning of the shift. In this sense the new behemoths were like churches calling the workers not to prayers, but to work.

Factory discipline could be better enforced if workers were under constant surveillance inside a building instead of letting them work at home. Yet without lighting one could work only during the day. Lighting enabled an increase in the length of the working day and soon factories, unlike churches, were operating day and night.

The American factory system started in mill towns such as Lowell in Massachusetts, named after the industrialist Francis Cabot Lowell, and widely regarded as the cradle of the American industrial revolution. Many of the workers were young women who came from the countryside. They lived in boarding houses with four to six sharing a bedroom (though life on the farm was just as crowded). There was the occasional strike and resistance, since conditions changed regularly. Eventually the constant supply of foreign workers ensured that the owners kept the upper hand.

As in a kind of relay race, the United States took the baton from Britain in the mid-19th century and ran with it for the following 100 years, soon becoming the leading industrial power. By the end of the First World War, manufacturing output in the US was greater than in Britain, Germany and France combined.

It is one of the more valuable aspects of Freeman’s book that he also deals with the mythology surrounding the factory system, as well as its artistic expressions and the social struggles it generated. When the steam engine took centre stage it was believed that machines were opening the doors to a new civilisation, an era of bounty, freedom and national power. Factories were associated with the idea of progress. The countryside was backward: Marx famously condemned the “idiocy of rural life”. For artists, as well as social critics, however, the big factory often meant misery, social conflict and ecological degradation. They were not entirely wrong. Until the end of the 19th century the consumer society was barely discernible, although it would soon become the basis for the wide consensus behind capitalism.

Henry Ford’s factories constituted a major innovation, not just for his paternalistic outlook (workers had to lead exemplary lives) or for his extensive use of the assembly line but because he paid his staff high wages: a mass market required prosperous workers. By then, as Freeman explains, steel not cotton had become central to the economy: “The formation of US Steel as the largest corporation ever created added to the sense that steel had to be a matter of public concern, not strictly a private endeavour.”

This is what constituted “Americanism” for Lenin, one of the champions of Soviet industrialisation and an admirer of Frederick Winslow Taylor, the leading proponent of the assembly line system and of the rational exploitation of human power. “We must organise the study and teaching of the Taylor system,” declared Lenin, “and… adapt it to our purposes.”

By 1930 Tractorstroi, near Stalingrad, had become the largest factory in the Soviet Union. In 1932, following an agreement with Ford, it was overtaken by a car plant, the Gorky Automobile Factory, erected in Nizhny Novgorod and employing 32,000 workers (a quarter ofthem young women). Conditions in these Soviet behemoths were better than in factories in the early phase of industrialisation in England or America, and certainly better than in the countryside. In the “workers’ state” it was better to be a factory worker than a peasant (even if we discount the horrors of collectivisation).

By the 1950s and 1960s, although large factories continued to be built in the United States, the era of the behemoth was coming to a close: de-industrialisation set in. Factories would move gradually to Asia; first to Japan and, over the last 30 years, to China, while what Freeman calls Soviet “gigantism” marched on.

In China Mao’s opponents won: it did not matter who ran the factory (“whether the cat is white or black as long as he catches mice”) provided production was maximised. Shenzhen, near Hong Kong, where Foxconn (notorious for a spate of suicides among its workers) is located, became the fastest-rising urban conurbation in the world: from 321,000 inhabitants in 1980 to almost 12 million in 2016.

Today only 8 per cent of Americans work in factories against 43 per cent of Chinese. And where once Westerners produced mainly for Westerners, many Asian factories now produce for the West; assembling trainers in Vietnam for companies such as Reebok and Adidas, and electronics components in China.

The one major criticism to be levelled at Freeman’s otherwise fascinating book is that it is too US-focused. British industrialisation is there merely as a path-breaker for the United States. And while China/Foxconn gets pride of place in the final chapter, it is as if the large British, German, French and Italian factories never existed: no Volkswagen, no Fiat, no Renault, none of the white consumer goods made in German and Italian factories. And there is virtually nothing on Japan (no Sony, no Toyota).

Meanwhile, in the United States today the most valued companies are in the retail sector, either physical stores as with Walmart or online as with Amazon, or in software, with the likes of Google and Microsoft. Here America dominates, but no one knows for how long. In China the internet conglomerate Tencent, one of the largest corporations in the world – protected by the communist firewall – is supreme. Behind Tencent loom other Chinese internet giants such as JD.com and Alibaba. There is plenty for behemoths such as Facebook, Netflix and Google to worry about.

Behemoth: a History of the Factory and the Making of the Modern World

Joshua B Freeman

W W Norton, 427pp, £22

Donald Sassoon is emeritus professor of comparative European history at Queen Mary, University of London