Re: Europe’s birth rate, we could point to many individual factors, but the overall reason, I think, is a rising time preference in European society. Having and rearing children is, of course, a long-term project requiring many sacrifices of utility in the present, and Europeans increasingly are no longer willing to make those sacrifices.
I do think the welfare state is a big part of the equation here. It both makes it more difficult to pay for the rearing of children in the present because of higher taxes and makes the prospect of a childless old age seem more palatable. I also think the secularization of the society plays a role, as the incentives to childbearing found in Christian teaching ebb.
As for the opening of Europe to immigration, I think decolonization and guilt over the colonial past played a big role. The offer of immigrant status and eventual citizenship for residents of the former colonies was seen as a form of reparations. I don’t know that any proponents of the policy had really calculated the magnitude of the impact of those decisions in the 1960s, although I could be wrong.