Solomon speaks of real life experiences. The foolishness of covetousness can lead someone to acquire as much as they can in terms of wealth at the expense of their souls.
The misery of oppression by those with and in power is a fact that is evident in every facet of life. However, there's a God who sees every evil deed that is visited on His Children. Solomon's conclusion and assumptions needed further interrogation since no one can question the reason of their suffering according to Romans 8:28.
Action and visibility will project you to the world. If you're diligent in your work, you will dine with kings.
We need you oh God to fight our battles.