Jacques Delors did one heck of a job when he showed up at the TUC conference in 1988. Britain was a year into Margaret Thatcher’s third term and the mood on the left was despondent. Organised labour had been weakened by a combination of mass unemployment, a hollowing out of manufacturing, defeat in the miners’ strike and legal curbs on trade union power.

Fear not, Delors said. The domestic political outlook may be bleak but Thatcherism can be circumvented by action at a European level. Brussels has a plan for a social Europe that will protect workers, tame capitalism and prevent a race to the bottom.

The Delors message was instantly popular. Ron Todd, the general secretary of the Transport and General Workers Union summed up the prevailing mood when he said “the only game in town is in a town called Brussels”. Judging by the debate over the Brexit withdrawal bill, that sentiment remains powerful 31 years on. All week Labour MPs have been lining up to say that only by staying closely aligned with the EU can the socially progressive rights that Brussels has delivered be protected.

The only way to advance workers’ rights is to elect a government pledged to full employment and collective bargaining

There is one problem with this idea: it is complete nonsense. Britain’s labour market has been reshaped over the past 40 years by deregulation, privatisation and anti-trade union laws, not by the limited protections delivered by the EU, which are weaker in practice than they sound in principle. There was, for example, nothing in the draconian Trade Union Act 2016 that would have run counter to EU law, not even the clause – eventually dropped as the legislation passed through parliament – that picket supervisors would have to give their name to the police.

This should not come as a surprise, because from its earliest days the overriding principle behind the European project has been to make life easier for capital, which is why multinational corporations like it so much. While the pro-employer bias has been there since the Treaty of Rome in 1957 it has become more pronounced in recent years as the slowdown in growth, entrenched high unemployment and the crisis in the eurozone have prompted calls for European labour markets to become more “flexible”.

Anybody who suggested to Greek workers that they should look to Brussels to protect their rights would be given short shrift. It speaks volumes that when a structural adjustment programme was imposed on Athens as the price of financial support in 2015, it was the International Monetary Fund that sought to tone down the hardline demands of the Commission and the European Central Bank, for whom the imperative was to safeguard the profits of European banks rather than to protect Greek workers.

The truth is that social Europe never delivered all that much, even in the days when the European economy was in much better shape than it is currently. That’s because a succession of EU treaties has enshrined in law four basic freedoms for business: the right to provide services; the right to establish an enterprise; the right to move capital; and the right to move labour. These freedoms trump all other considerations, including the right of workers to withdraw their labour.

This was best illustrated in the European court of justice’s ruling in the Viking case in 2007. At issue was the concept of “posted workers”, employees hired in one country but employed in another. Viking, a Finnish ferry company, posted workers from Estonia as a way of getting round collective bargaining agreements made in Finland. The action by the company – a classic example of a race to the bottom – was challenged by the International Transport Workers Federation and ended up in the ECJ. The judges sided with the company, with the ECJ advocate general Poiares Maduro saying “the possibility for a company to relocate to a member state where its operating costs will be lower is pivotal to the pursuit of effective intra-Community trade”.

Andy Haldane, the chief economist of the Bank of England, said this week that progress had been made in gender pay equality but more needed to be done. What he didn’t say was that all the progress made thus far to reduce the gender pay gap to about 10% has been the result of domestic pressure and industrial action stretching back to the 1968 strike by women machinists at Ford’s Dagenham plant. The EU was not responsible for the Equal Pay Act or the Sex Discrimination Act. Nor was it Brussels that led to the passing of the Health and Safety at Work Act or the Employment Protection Act. All of these pieces of legislation were enacted in the first half of the 1970s, and it is no coincidence that this was a period when trade unions were stronger and collective bargaining more widespread.

In consequence, the only sure way to advance workers’ rights is to elect a government pledged to full employment and collective bargaining. The notion that only Brussels stands in the way of a barrage of deregulation betrays not just a misunderstanding of the way the EU operates but also a deep and irrational pessimism on the left, a belief that the Conservatives will be in power for ever no matter what they do. The left doesn’t need the EU to fight its battles. What it needs is to make the case for better working conditions and win over a public sick of a labour market loaded in favour of employers. With a bit of self-confidence it shouldn’t be that difficult.

• Larry Elliott is the Guardian’s economics editor