Ultimately, over the exceptionally long term, as automation removes the need to work, the solution is to move to a leisure-based society in which everyone is given equal stipends and allow optionally working up to, say, 10 hours per week to earn more, thus removing the problem entirely.
Although that solution may be roughly on the scale of "ultimately, the great heat death of the universe will make the problem moot."
Although that solution may be roughly on the scale of "ultimately, the great heat death of the universe will make the problem moot."