Then Pharaoh said to Joseph, “Since God has made all this known to you, there is no one so discerning and wise as you.Genesis 41:39
Pharaoh has two dreams and just happens to mention them around the cup bearer who just happened to be in prison with Joseph who just happened to be there because his brothers sold him into slavery and then he just happened to be falsely accused. The result is Joseph being in a position where he will be able to save his family from a famine. God saves his people through a series of seemingly random events.
I don't often understand how God's plan is working out in my life but that is because I am looking at the back of the tapestry. Every 'random' occurrence is part of what God is doing in my life.
Working in a furstrating situation, for a nightmare boss, is not incidental in my life. God has a purpose for that. It may not be clear to me for a very long time, if ever, but that does not mean it is not good