Absolutely, the Leave campaign tapped into the unrest in a genius way.
Wrt how uncontrolled immigration directly affected the traditionally unskilled working classes:
Labour created the welfare trap - it actually paid more to not work in some instances.
If you were going to be financially worse off by working a shitty low paid job, why would you bother??
Labour decided not to stagger the free moment when the former eastern bloc countries joined the EU; France, Germany et al opted to phase the free movement of these countries in over a 5 yr period.
These new countries had an average wage which was a fraction of our average wage.
If you suddenly had the opportunity to earn over double your wage, even though it's in an unattractive low paid role, why wouldn't you do it?
Thus, everyone was 'happy'.
BUT that course of events was unsustainable - the benefits trap had to be addressed.
This happened then over the next 10 yrs, once the Tories came in they started to tackle it.
They had to 'make work pay' again.
There has also been a long period (began under Labour) whereby trades and vocational work was devalued & underfunded - only graduates count! A degree for all! etc.
Thus, we got to the point whereby our long ignored, unskilled working classes were unable to compete for the unskilled jobs that they would have traditionally filled - because they were competing with skilled, trained workers from the EU.
This has been the reality of 'immigration' for these people.
When they then have swathes of politicians, 'experts' and middle class 'lefties' telling them that 'immigration is good for you', it is no surprise they rail against it.
When they rail against it they are called 'bigot' (Gordon Brown), or 'racist' (MN over the run up to the referendum was full of this btw).
It has been obvious to anyone who actually listened or cared, but nobody did.