Beneficial to who? Factory owners - yes, factory workers - no ...
But factory workers are consumers too and gain (less visible) benefits from immigrants. I.e. if you work at factory X but consume goods produced at factory Y, you benefit from cheaper labor at factory Y. If you work at factory X but consume medicine, you benefit from having an Indian doctor and a Filipina nurse.
Assuming the savings are passed on to the consumer.
I think it's more important that the owners vastly benefit, and may manage to push down wages across more than just one industry by leveraging economic differences between nations that only they can take advantage of.
If the political climate allows a separate class of citizens, then there is no need to eliminate the welfare state.
https://en.wikipedia.org/wiki/Comparative_advantage
Of course, the modern welfare state cuts against that, as do the harmful externalities imposed by (eventual) voting. But the humane solution here - which might be politically impossible - is to allow immigration while eliminating the welfare state and making the newcomers into a permanent non-voting underclass.