Immigration of skilled labor is always valuable. Japan, the US, France, Germany, etc should always welcome it, and should have policies that allow people with verified and needed skills to immigrate.
However, drowning your citizens in a sea of immigrants is cultural suicide. If your culture is such that it has allowed your ancestors to build a country that immigrants want to flee their own countries to live in, then your culture is worth preserving, rather than allowing it to be replaced by the culture of those who would happily flood into it.
That means, you can't solve your demographic problems by opening the floodgates. Instead, you need to fix the economic problems that are making people hesitant to have children in the first place.