I will begin with an observation that I tend to take a rather ext-based approach. I have nothing against midrash or the interpretation of ohers, but I think we gain new insights into the text by trying to get down into the linguistic nitty gritty.
To begin, I was struck this week by the number of ways people describe prison. The text last week, in narrator mode, uses "Beit Hasohar", the prison. The butler and the baker are described as being "under guard in the house of the Sar Hatabchim, in the Beit Sohar." (40:3). Yosef, in describing his sorry plight to the butler after interpreting refers to himself as cast into the "bor," the pit or dungeon. (40:15). It is noteworthy that his brothers also put him in a bor, a pit, and it is so described there.
This week, when the butler describes his captivity, he refers to it only as "In the custody of the Sar Hatabachim," omitting reference to anything as indeicate as actually being in prison. (41:10).
Also of interest, when Paro brings forth Yosef, the text (in narrator mode) describes him as brought forth "from the bor (pit)." (41:14). Why does the text use the word "bor" here instead of Beit Hasohar? Because this marks the change in Yosef's fortunes. Since he was placed in the bor by his brothers, he had been a sold as a slave, been the object of seduction then slander on the part of his master's wife, and placed in prison. From this time forward, however, he would reign as second only to Paro until the end of his days. In this sense, he was finally lifted out of the pit into which his brothers had cast him.
If one wishes to use "pit" even more metaphorically: Yosef now assumes the role assigned him by Hashem. Everything until now has been prologue. But Hashem has set Yosef on a course both to save Egypt and to bring Yisroel and his family to Egypt.
More later.