Ecc 4.1-16 tells us that Solomon returns to his previous thought in Ecc 3.16 about some of the abuses of justice on those who had no comforter or defense he has observed, and he talks about success without heirs or friends and the vanity of it all.
v 1…Then I looked again (at the 3.16 thoughts) at all the acts of oppression which are being done under the sun (in the natural world everywhere). And behold (see for yourself) I saw the tears of the oppressed and they had no one to comfort them (to deliver them); and on the side of their oppressor was power, but they had no one to comfort them.
v 2…So I congratulated the dead who are already dead (because from the viewpoint of the natural man their troubles are over) more than the living who are still living (and subject to oppression).
v 3…But better off that both of them is the one who has never existed, who has never seen the evil activity that is done under the sun (and had to live under it).
v 4…And I have seen (work not motivated by criminal minds) that every labor and every skill which is done is the result of rivalry between a man and his neighbor (even success by the sincere brings jealousy, greed and competition). This too is vanity (no purpose) and striving after wind (unsatisfying to the spirit).
v 5…The fool folds his hands (“hugs them”) and consumes his own flesh (using up his money to support himself and lives off his own fat).
v 6…One hand full with quietness (earn less with peace) is better than two fists of full labor and striving after the wind (be content with meeting your needs than to strive after the accumulation of wealth, which vexes the spirit).
v 7…Then I looked again at vanity (no purpose) under the sun (everywhere).
v 8…There was a certain man without dependent (no heirs), having neither a son or a brother, yet there is no end to his labor (accumulates wealth for nothing). Indeed his eyes were not satisfied with riches (and he never asked), “And for whom am I laboring, and depriving myself of pleasure?” This too is vanity (worthless, no purpose) and it is a grievous task (“evil it is”).
v 9…Two are better than one because they have a good return for their labor (more productive).
v 10…For if either of them fails, the one will lift up the other companion (help). But woe to the one who falls when there is not another to lift him up (there is a benefit in companionship).
v 11…Furthermore (also) if two lie down together they keep warm, but how can one be warm alone (in the winter especially)?
v 12…And if one can overpower him who is alone, two can resist him (the criminal). A cord of three strands (a union) is not quickly torn apart (if they are united).
v 13…A poor, yet wise, lad (in poverty) is better than an old and foolish king who no longer knows how to receive instruction (correction; he is beyond advice).
v 14…For he has come out of prison (a low estate) to become king, whereas also he that is born (a prince by birth) in his kingdom becomes poor (Joseph becomes a ruler, and Zedekiah is led away captive for instance).
v 15…I have seen all the living under the sun (everywhere) throng (support) the side of the second lad who replaces him (support the one who replaced an old foolish king).
v 16…There is no end to all the people, to all who were before them (in the previous generation), and even the ones who come later will not be happy with him (they won’t rejoice long in the new king because they will be just as weary as the parents were of his predecessor), for this too is vanity and striving after the wind (because supporting the new king may prove to be just as worthless).