Germany (where I live) has a much lesser problem with immigration, yet has a much more generous benefits system. I think the same is true of the Netherlands and the Scandinavian countries.
But all these countries also have much stronger employment legislation, meaning that companies invest in long term employees rather than having cheap disposable workforce.
Not that there aren't problems, but nowhere near the levels seen in Britain.
I believe that the "immigration problem" is just a political slight of hand, to distract from the real problems, and of course panders to racism.