Yeah, the malaise vastly predates Brexit and goes all the way back to Thatcher's policies, such as the selling of public housing and policies to make it harder for councils to build more, privatisation of a lot of public services especially natural monopolies such as water supply and rail, deregulating Finance and betting on it for growth in Britain, Press deregulation and concentration, and so on.
Then neoliberal governments of both the Tory and New Labor persuasion just kept and even doubled down on such policies (who can forget Thatcher's "greatest achievement", Tony Blair).
Then the 2008 Crash hit the UK hard thanks to the deregulation of Finance and excessive size of it as part of the British Economy (17% of it at the time of the Crash, if I remember it correctly) with some extra fueling from a housing bubble that had been inflated since Thatcher's days (which now is even worse).
Then the way that was handled was to save Asset Owners and make workers pay for it, exploding inequality (if I remember it correctly even already in 2015 real incomes for the bottom 90% if the population were falling at around 1% per year, whilst for the top 10% of the population they went up 23%) and hence poverty.
Meawhile paid up politicians, Press (remember Thatcher's deregulation of the Press) and Think Tanks spread far-right ideas such as ultra-nationalism and blaming foreigners (especially immigrants, but also "the EU") for the pain people were feeling as consequences of the post-Crash policies of their very own, 100% local, politicians.
Then that cristalized in the knee-jerk reaction against foreigners called Brexit (which, mind you, was still a less damaging far-right ultra-nationalist knee-jerk than the historically more comon one of "starting a war against some random foreign country").
And now here we are with Britain pretty much morphed in to a posh version of a Fascist country.