The German novelist Thomas Mann once dismissed those befuddled by his cryptic magnum opus, The Magic Mountain, by saying that all they needed to do was read the bloody book twice. I feel similarly about the Jurassic Park franchise, whose third sequel opened this week. Only I needed to watch the original about seven times to realise that this wasn’t just a guilty pleasure – a big blockbuster action film I loved watching again and again – but in fact an intricately constructed masterpiece with a serious message.

There’s a scene, fairly early on in the movie, I had missed until I watched it again on Boxing Day last year. Our human heroes land for the first time on Isla Nublar, home to the eponymous planned amusement park. The helicopter hits turbulence and the passengers are told to fasten their seatbelts, but Dr Grant, a slightly grumpy palaeontologist played by Sam Neill, realises that he is stuck with two buckle ends – the female parts of the mechanism – and no tongue. He improvises and ties them into a knot.

This is what film buffs call an “Easter egg”, an intentional hidden joke. The cloned dinosaurs in Jurassic Park, like the seatbelt, are supposedly all female, to stop them reproducing. Yet the underlying theme of the film is that, like Dr Grant, life forms will always improvise. “The history of evolution is that life escapes all barriers,” says Dr Ian Malcolm, a mathematician played by Jeff Goldblum. “Painfully, perhaps even dangerously. But life finds a way.”

You thought Jurassic Park was about dinosaurs? Let me dispel that misconception: in the original film they only appear on screen for a meagre 15 of 127 minutes. The scaly beasts might have been what originally dragged us into the cinemas with their sickle-shaped claws in 1993, but the reason we keep going back more for more had to do with darker stuff.

The real star of the Jurassic Park films was not the T-Rex, brachiosaurus or velociraptor, but Malcolm: the sardonic, black-clad philosopher-fool of this morality tale, who sees from the beginning that the park is an accident waiting to happen – a scientist sex-god who roamed the screens of this Earth long before everyone went mad for Dr Brian Cox and “geek chic”.

Michael Crichton, author of the original novel, and Steven Spielberg realised this, and elevated him to the status of protagonist for the sequel, which opens with another palaeontological Easter egg. When we expect the camera to cut to a roaring dinosaur, we instead get a shot of Malcolm yawning on the New York subway. Malcolm, you see, is a chaos theorist, and the Greek word for chaos also means “yawn”.

Chaos theory rose to prominence as a branch of mathematics in the late 80s; Malcolm is a compound figure inspired by the chaos theorists Ivar Ekeland, Heinz-Otto Peitgen and James Gleick, whose Chaos: Making a New Science had appeared in 1987, three years before Crichton’s novel.

At its heart was the idea that minor events could have very major unexpected consequences – in itself a little rebellion against traditional mathematicians’ strict faith in the infallibility of their equations. As Malcolm puts it: “A butterfly flaps its wings in Beijing and the weather changes in New York.” On Isla Nublar, of course, everything unravels after the island is hit by an unexpected storm.

Chaos theory became to Jurassic Park what Laurence Sterne’s squiggly lines were to Tristram Shandy

Chaos theory became to Jurassic Park what Laurence Sterne’s squiggly lines were to Tristram Shandy: a principle that maps out the plot. The chapter headings of Crichton’s book are illustrated with a so-called “dragon curve”: a mathematical fractal that starts out as a simple pattern and grows into a menacing reptilian wave. The outrageous question that the book and the film asked was whether evolution as a whole could be a chaotic system, inherently uncontainable and prone to spiralling out of control.

Nowadays many mathematicians view chaos theory sceptically and some say it was just an 80s fad. Not all system collapses are unpredictable. A traffic jam may look like chaos close up, but that doesn’t mean car travel is a chaotic system – we can work out why traffic jams happen and how to resolve them.

Jurassic World, the fourth in the series, has returned to the “order to chaos” formula of the first part, which makes me hopeful: one of the reasons why parts two and three didn’t work is that the dinosaurs were already on the loose when the films started. But it dispenses with the Malcolm figure – and about this I worry.

Because if Malcolm’s ramblings about the butterfly effect had a ring of truth after the collapse of the Soviet Union in 1990, it will appeal again in the age of unforeseen financial crashes, upheavals in the Middle East and minor incursions escalating into major conflicts in Ukraine. As Malcolm says in The Lost World, after the dinosaur park’s creator, John Hammond, worries that he is making the same mistakes all over again: “No, no, you’re making all the new ones.”

I was 12 when I first watched Jurassic Park. Twenty-two years later I find it less hard to imagine real life taking unexpected turns: I sometimes wish Dr Ian Malcolm was on hand to inject a bit of sarcasm.