Job does something stunning in the aftermath of his ordeal. He leaves his daughters an inheritance, along with his sons (Job 42:15)...
Then the Teacher turns to wealth, which may be gained as a result of toil. What about the accumulation of wealth as the higher purpose behind work? This turns out to be worse...