God created everything and set the universal laws, the cause and the effect. He knows everything - past, present and future. He knew the choices we would make and the consequences of our choices. He tells us in His word and directly in Old Testament times, but humans willingly ignored, disobeyed or remained ignorant. Suffering is the consequence of sin, whether directly or indirectly. It was the disobedience of God's intended purpose that caused generations down the line to suffer. We are still suffering the effects of Adam and Eve's choice as a sober warning of how we shouldn't choose to live.
Did God know all this would happen? Yes. His plan uses the suffering in our lives for good intentions - to develop our character and teach us about Him. We may not like our suffering, but from the bible in Romans 8:28, "we know that in all things God works for the good of those who love Him, who have been called according to His purpose."
God already has everything planned out from start to end for good. He sent Jesus to take the punishment of sins for the world and will judge the world at the end of the age so that no one can escape justice. This world is temporal so our perspective of our suffering is limited and we won't know what will happen in the future, much less in eternity.