Absolutely. The Singapore HDB model is a great example to follow. [1] Almost 80% of Singaporeans live in HDB flats.
But the reason the government won't build is the same reason they don't let individuals build. They are beholden to the voting land-owning class who doesn't want to see the value of their properties go down by adding new supply.
[1] https://en.wikipedia.org/wiki/Housing_and_Development_Board