All of human history is summarized in Psalm 107. The history of individuals, of nations, of civilizations, are all represented by the scenarios described here.
History is shaped by the choices, actions and interactions of individual human beings, and the story of humans on earth, whether recorded for us to study and interpret, or lost in the destruction of time and tyranny, follows the cycle of life the Psalmist portrays in Psalm 107.
The cycle goes like this:
1) Human beings become lost. They wander, rebel against their Creator, become imprisoned in darkness, and generally get themselves into devastating situations way beyond their control.
2) They cry out in their pain.
3) God hears their cry and rescues them.
4) They enjoy relief from their struggles.
Until the cycle begins again.
We see this in the recorded history of world civilizations. We see this in our own personal histories.
Not all pain and darkness is the direct result of our own personal stupidity or sin, of course. The psalmist addresses this fact. He talks about human oppression, and how God deals with the oppressor. But the overall message is that all our pain, deserved or undeserved, is meant to become the vehicle that drives us back to our Creator.
And He is faithful, forever.
"Let all who are wise heed these things and ponder the loving deeds of the Lord."