When we read the story of Joseph it seems to be that Joseph brought the hate of the brothers and the pit on himself.
He wasn’t speaking politically correct,he decided that the dreams that he had must be told to his brothers and to his father Jacob.
It’s really interesting how to sages of Israel tried to enlarge the danger of the pit by saying that there were scorpions and snakes there, since there was no water, as written:
“וַיִּ֨קָּחֻ֔הוּ וַיַּשְׁלִ֥כוּ אֹת֖וֹ הַבֹּ֑רָה וְהַבּ֣וֹר רֵ֔ק אֵ֥ין בּ֖וֹ מָֽיִם׃״
“ And they took him, and cast him into a pit: and the pit was empty, there was no water in it.”(Genesis 37:24).
There’s another Midrash that described two pits- the first with sacks and the other with the scorpions and snakes. The lack of water is a lack of Torah there- I am not sure to whom this lack of Torah refers to- Joseph or the brothers- what do you think?