Almost every episode of Malcolm in the Middle ends with the sound of a door being slammed shut. It returns Malcolm's family – a combustive medley of troublemakers and misfits – back to the status quo. This is standard in sitcoms; everything returns to how it was. The difference is, in Malcolm in the Middle, the status quo is bleak. Unlike the characters in, say, Friends, who live comfortably in midtown apartments with lives seemingly unbothered by work, Malcolm's family is poor. Every joke, plot and resolution revolves around this material fact.

I grew up thinking Malcolm in the Middle was a zany show about four quarrelsome brothers and their parents. Re-watching it now it's clear what the show is actually about: the idea that meritocracy is a sham, social institutions are corrupt and wage-labour is cruel. The parents, Hal and Lois, have a comically carnal relationship, which I didn't really understand when I was young. It's a way of protecting themselves from the vicissitudes of capitalism. All the characters are condemned, in one way or another, by the world that surrounds them.

While this might sound like heavy stuff for a primetime show on FOX, sitcoms have smuggled in radical ideas before. In fact, there's a reference to this on Malcolm, Dewey and Reece's bedroom wall: a poster of the sitcom Dinosaurs, which ran in the early 1990s on ABC. Dinosaurs is unlike any sitcom America has produced: an anti-capitalist, moralistic puppet show about a family of dinosaurs living on a swampland owned by the FruitCO corporation (a division of WeSaySo enterprises), run by a Trump-esque CEO. It offers a critique of exploitation, sexual harassment and political corruption, and concludes with the family becoming extinct due to a climate change-induced ice age. Dinosaurs was Malcolm's guiding spirit.

In the beginning Malcolm's family are in debt, perpetually stressed, living in a house that's falling apart. A typical image is Hal and Lois sitting at a kitchen table littered with bills. Lois doesn't have time to go beyond the basic demands of the roles expected of mothers – cleaning clothes, scrabbling together lunch – since she's keeping up a low-level service job in a drugstore. Hal works a white-collar clerical job in an office. It's the kind of unproductive, pointless job capitalism makes up just to keep people miserable. He does so little work it's at one point discovered he's never turned up on Fridays, going on day trips by himself to places like Seaworld – a radical refusal to work if there ever was one.

"'Malcolm in the Middle' showed that the promises of neoliberalism had always been false."

In the first episode, Malcolm is recognised to be a genius with an IQ of 165. His underfunded public school puts him in the gifted class, "the Krelboynes", where they keep "all the sort of good things they don't waste on the normal kids". In a conservative sitcom this would be a rags-to-riches story, his intelligence elevating the family to a prosperous future. But what happens instead is ruthlessly honest. Malcolm's gift doesn't bring him out of his class position; it entrenches it: in the show's finale he gets accepted into Harvard but can only afford the tuition fees by working as the university's janitor at the same time.

This was all years before the 2008 economic crisis, after which publications started writing about the "collapsing middle class" across Western economies, as if everything had been fine before that. Malcolm in the Middle showed that the promises of neoliberalism had always been false: real wages for middle and low wage workers had stagnated since the 1980s, personal debt had mushroomed. When the family has to cancel a summer holiday to pay for Malcolm's hospital bills they make a cost-benefit analysis that's rarely seen on TV, but happens every day across America.

The show doesn't just depict the struggle of surviving under capitalism, it undermines its ruling ideas. One of the recurring jokes is that the family's poverty is the result of the parents' individual character flaws rather than structural forces. When Lois and Hal are forced to stop having so much sex because of a yeast infection they start obsessively tending to the house and transform it into an idyll of bourgeois living – the grass grows and the flowers bloom. When Dewey discovers Hal has been secretly smoking, he works out that with the amount he's spent on cigarettes he could have sent Dewey, who's also intellectually gifted, to private school. The jokes parody the Thatcher / Reagan rhetoric that poor people are poor because they don't work hard enough.

Re-watching it now it's clear what the show is actually about: meritocracy is a sham, social institutions are corrupt and wage-labour is cruel.

TV critics have lauded Malcolm's pioneering use of a single-camera and no laughter track, which led the way for the postmodern comedies of the 2000s. But few commented upon the cast's diversity. Malcolm's best friend, Stevie, isn't just African-American; he's physically disabled and upper middle-class. This isn't some cruel, intersectional joke, like when Lena Dunham responded to a lack of diversity in Girls by writing in a black Republican for two episodes, but a sensitive relationship through which both characters develop. Also, Stevie's conservative family values satirise the "respectability politics" – the idea of "acting right" to get ahead in a world of white dominance – which was seen in programmes like The Cosby Show. (Stevie's jumpers are straight out of The Cosby Show's wardrobe.)

The same goes for the eldest brother Francis's wife, Piama, who is of Inuit descent. Although there's a pitiful absence of Native American characters in American culture, Piama isn't a token of diversity – her character is complex. Lois is initially distrustful of her for taking away her son, but they form a sense of solidarity over a shared enjoyment of punishing their useless partners – smashing up Francis and Hal's stuff when they go on a selfish motorbike trip by themselves.

It's become obligatory recently for critics to end reviews by attempting to integrate pop culture into the contemporary political climate – an impulse that has, at times, felt over-laboured. But as politics becomes increasingly senseless, it's harder to detach it from culture at large. Completely immersing myself in Malcolm's world, I have such sympathy for their lives that I can't help but wonder how they would fare in Trump's America. Probably not well.

Then I had a scarier thought: what if they voted for him? Although Trump's success depended on multiple demographics – college-educated, wealthy whites were crucial – as a white family in a low income-bracket somewhere in an undefined midwestern state, Malcolm's family would have been a key demographic to mobilise; possibly part of the considerable swing from poorer Democrats to Republicans that helped Trump clinch it. Could Lois and Hal have been convinced by Trump's promises to bring back high wages and an export-based economy? Would they have been fooled by his anti-establishment disguise and found catharsis in a protest vote?