One could be forgiven for wondering what the Independent Workers’ Union of Great Britain (IWGB) – a small trade union that represents mainly low-paid migrants and workers in the “gig economy” and relies on crowdfunding to help finance its initiatives – is doing intervening in the UK’s most important court case in recent history.

The starting point for understanding why the IWGB has an interest in the Brexit case is this: the UK leaving the EU represents potentially the biggest assault on workers’ rights and migrants’ rights in a generation. Indeed it is difficult to overstate the degree to which working people depend on employment law that originates in Brussels.

To name just a few examples: your right to paid holiday; your right not to be discriminated against because of your age or sexual orientation; your right not to be sacked or have your wages reduced when a company buys out your employer; your right to be consulted when your employer wants to make you and your co-workers redundant; protection against unfavourable treatment towards you if you work part-time; and equal pay for men and women.

To get just a taste of what the removal of these rights would mean for our members, four of our (British) couriers are bringing an employment status test case which would now fall apart because it relies on legislation that comes from the EU.

Similarly, two IWGB reps elected to represent University of London employees (the majority of whom are British) would no longer serve a purpose because they were elected through legislation that also originates in EU law. And our security guard members, who tend to work 12-hour shifts, could be stripped of their legal right to rest breaks.

To say that the government will simply keep or reintroduce all these rights into British law – as unlikely as this is – rather misses the point. The importance of EU employment law is not just that in some instances it introduced rights that did not exist in the UK before; it’s also that for as long as the UK subscribes to EU law, current and future rightwing UK governments, in the name of austerity or whatever other wrongheaded ideology they are pushing, can’t undo these protections. And EU courts tend to interpret the laws more favourably for workers than UK courts do. These protections for workers are a fundamentally good thing, and the IWGB opposes any attempt to remove them.

In terms of migrants’ rights, the EU’s free movement of labour principle has allowed hundreds of our members to come and work here after having lost everything in the economic crisis in Spain. Free movement has allowed others to come to London from central Europe in order to work for courier companies. As far as our members go, these migrant workers have not driven down wages but on the contrary, have left their jobs better than they found them.

Spanish-citizen cleaners at the University of London led a campaign that saw the introduction of some of the best wages and terms and conditions for cleaners in the UK. Likewise central European couriers have contributed to campaigns that resulted in pay increases of 17%-28% in the UK’s biggest same-day delivery companies. Free movement has allowed our members to enjoy a better life, it has allowed them to bring their families over, and it has allowed them to contribute to improving pay, terms and conditions for their British co-workers. The IWGB opposes any restrictions on the current free-movement arrangements.

So is the IWGB trying to block Brexit? No. But nor do we think Theresa May should be given free reign to implement the hard Brexit she thinks will get her re-elected in 2020. Before the prime minister potentially upends four decades of employment rights and turns upside down the lives of more than 3 million EU citizens, we believe there should be as much scrutiny and input from elected officials as possible. And we hope that that scrutiny and input will result in strong protections for workers’ rights and will avoid the temptation to restrict free movement.

A common accusation against anyone in favour of free movement is that they are undermining democracy because the referendum result clearly reflected a desire to rein in immigration. The problem with reducing an extremely complex and multi-faceted issue into a binary choice is that it is nigh impossible to know for sure what a vote means. Of course some people voted to come out of Europe over immigration. Others voted to reject globalisation and free trade (yet the defining feature of the government’s public comments on Brexit is the extent to which it wants to make the UK a leader in free trade). Others voted to come out in protest against an establishment position that united leaders of all mainstream political parties, the governor of the Bank of England, the IMF and the US president. And others did so because they were told it would bring home £350m a week for the NHS. I also know plenty of people on the left who voted for Brexit because of how poorly the EU had treated Greece and refugees.

Finally, for some voters “immigration” is little more than a proxy for concerns over low wages, job insecurity, insufficient housing and strained public services. I don’t think millions of workers across England and Wales purposely voted to deprive themselves of holidays. And given that no amount of EU migrants could do as much to increase job insecurity and drive down terms and conditions as the removal of EU employment law, we should focus on where the danger really lies.

Perhaps the best way to put into perspective what the IWGB is doing getting involved in this case is to think about what Ukip would have done if it had lost the referendum. Would the party whose raison d’etre was to achieve Brexit simply have closed up shop and told its voters to go back to voting Tory or BNP or whatever it is they did before? I don’t think so. It would have continued to bang on about Europe and migrants until the cows came home. And as the sole trade union involved in one of the most important cases for workers in a generation, the IWGB will continue to bang on about workers’ rights and migrants’ rights, with as loud a megaphone as we can find, using every legal and democratic means available to us.