Government spending to increase demand has a lot to do with politics. Politicians always love to spend to buy votes.
Also the market moves to what the government demands, so other demands can suffer because of it.
If the government spending is based on real loanable funds, the interest rates rise and private investors will find borrowing harder.
If it is based on monetizing public debt (the fed buying bonds), the interest rates are reduced, sending a false signal to investors, because their plans doesn't take into account the coming inflation and inflation will cause interest rates to rise in the long run.
So government spending always represents an attack against private investors, who are the ones supposed to solve crises.
I prefer to attack economic cycles at its roots, that is interest. The compounding effect of interest pushes the exponential growth of credit, but when that growth becomes unsustainable, the shrinking credit produces deflation which produces further liquidations in a positive feedback loop. Since reducing interest rates by monetizing debt is unsustainable, interest has to be eliminated by demurrage.
In my island model, there is no interest involved, just simple math, still you can see productivity increase will lead to recession
Actually I do not think government can do very profitable investments, but since most of the small companies fail anyway, it does not really matter who is doing the investment. In a post recession time, small companies typically are contracting and saving instead of investing, and banks typically are not willing to loan to those high risk small companies, so you really need some one powerful enough to spend BIG to bring up the demand. Ideally it should be the big multi-national corporations doing this, but I guess they do not really care about the effective demand when they are still looking at profit/earnings
I can think of 4 ways to do with increased productivity
1. Increase export
This put the problem to outside world, but do not work in a global level (There is no aliens on Mars will trade with human), it does not work when globalization has reached certain maturity
2. Move redundant people to new industry
This has been the case for hundreds of years, and mostly driven by human desire. Now that most of our desire have been fullfilled, it's getting difficult to find a new industry that can absorb huge amount of redundant people, so government spending for longterm projects is the current cure
3. Heavy taxation on high income people and use wellfare system to compensate those who have been replaced by machines and software
Nordic countries have this practise, this will create less trouble in society but reduce efficiency and discourage hard working (maybe that is needed)
4. Reduce the working hours so that more people are needed
This actually is the best long term approach no matter how high the productivity is, working hours can continously decrease and at the same time it gives people more time to consume, I don't know why no one is discussing this alternative