This response is prompted by Joseph’s plan which was seen as “good in the eyes of Pharaoh…” Then Joseph’s entire situation flips from imprisoned slave to ruler of all of Egypt.
Many have promoted this lesson. I think initially about our Torah. Deuteronomy teaches us (32:7), "Remember the days of old; ...