The results of this is a political trap without an easy exit: Impose punitive taxes on the working population and you'll strangle the economy and incite capital flight and outright rebellion. Form a consensus with other mainstream politicians to slash pensions and benefits, and you'll push the pensioner voting bloc into the arms of whatever extremists promise to protect their interests. And you can't allow large-scale immigration to correct the demographic imbalance and raise tax revenues, because the same pensioner voting bloc is also rabidly anti-immigration.
Brexit was a first taste of this: The 1997 Labour government saw the demographic and revenue crisis coming and thought EU migration was a solution. But the long-term result was to inspire an anti-immigration and anti-EU movement amongst older voters that has forced the country out of the EU. In Germany you see the same forces at work with the rise of AFD, and in France with the FN. This is going to get a lot worse before it gets any better.