But we can't count on migration on the long term anyway, as countries with current net positive population growth rates are on the way to go sub-replacement in 1-2 generations as well.
Housing unaffordability should be pinned on NIMBY, bias against high density housing, and the decades long push to optimize housing as a rent-seeking friendly investment vehicle instead of simple dwellings. Today if you intend to buy an apartment in a high cost city, odds are that you must not only outbid people wanting to live there as well, but also rich people overseas that invest in real state as a way to stash money offshore and/or evade taxes.
It would if you'd import actual builders (which is strictly regulated industry). Instead we (NZ) get IT specialists (like me, lol) and if you are lucky - occasional nurse.