I'll try to list a few points that might help.
The last one you mentioned, enslavement of Israel under Pharaoh, might be the simplest:
תַּנְיָא, רַבִּי שִׁמְעוֹן בֶּן יוֹחַאי אוֹמֵר: שָׁלֹשׁ מַתָּנוֹת טוֹבוֹת נָתַן הַקָּדוֹשׁ בָּרוּךְ הוּא לְיִשְׂרָאֵל, וְכוּלָּן לֹא נְתָנָן אֶלָּא עַל יְדֵי יִסּוּרִין, אֵלּוּ הֵן: תּוֹרָה וְאֶרֶץ יִשְׂרָאֵל וְהָעוֹלָם הַבָּא.
Additionally, it was taught in a baraita with regard to affliction: Rabbi Shimon ben Yoḥai says: The Holy One, Blessed be He, gave Israel three precious gifts, all of which were given only by means of suffering, which purified Israel so that they may merit to receive them. These gifts are: Torah, Eretz Yisrael, and the World-to-Come.
Akeidat Yishak and driving away Hagar and Ishmael are two or three of Abraham's ten trials mentioned in P. Avot 5:3. Also, in an article here the author examines if these ten are related to the ten times Yisrael tried God's patience in the midbar in Ps. 95.
Really everything is for the sake of Emunah, as at the end of the discussion in Makkot 24:
Rather, say: Habakkuk came and established the 613 mitzvot upon one, as it is stated: “But the righteous person shall live by his faith” (Habakkuk 2:4).
From the sefer Likutei Etzot, this point mentions suffering in the context of Emunah, personal growth etc.:
Emet w'emunah #34. Faith is correlated to the power of growth and the power of sprouting forth, and this is the aspect of patience. In other words, when faith is complete, one grows and sprouts forth in serving HaShem, no matter what happens, because no confusion or obstacle can confuse him. Rather, he makes himself patient to suffer whatever will come upon him, for all the obstacles and confusions in serving HaShem, in which he doesn't draw closer to those who fear HaShem, is all a result of laziness and depression and the heaviness that comes from a lack of faith. Because if his faith in the truth were properly complete, he certainly would run and be very speedy to draw closer to them. Thus, that he does not pray properly is also a result of laziness and heaviness that comes from a lack of faith. Certainly, if he had complete faith and he would believe that HaShem was standing over him and listening to every word by word that comes out of his mouth and heard the sound of his prayer, he would definitely pray properly, with enthusiasm and great desire. Rather, the main confusion of prayer is from a lack of faith and thus, all of the distancing from tzadikim, God-fearers, and from truly serving HaShem - all of it is from a lack of faith through which laziness, depression, and heaviness come upon him. However, when he has complete faith, nothing can hold him back. Rather, he becomes patient to suffer anything, and he grows and sprouts forth in serving HaShem, as it should be. (From Likutei Moharan I, 155)
Faith is the source of blessings, as written in Likutei Moharan Torah #31. With faith, as mentioned above, it doesn't have to be suffering, rather a trial and a growth experience.
וֶאֱמוּנָה הִיא מְקוֹר הַבְּרָכוֹת, בִּבְחִינוֹת (משלי כ״ח:כ׳): אִישׁ אֱמוּנוֹת, רַב בְּרָכוֹת, בִּבְחִינוֹת (בראשית ב׳:ג׳): וַיְבָרֶךְ אֱלֹקִים אֶת יוֹם הַשְּׁבִיעִי. וְאֵין שְׁלֵמוּת לְהַבְּרָכוֹת, אֶלָּא עַד שֶׁיְּקַבְּלוּ מִמְּקוֹר הַבְּרָכוֹת, בִּשְׁבִיל זֶה כְּתִיב בָּהֶם שֵׁשׁ בְּרָכוֹת וְאַחַד־עָשָׂר, לְהוֹרוֹת שֶׁאֵין לָהֶם שְׁלֵמוּת.
And faith is the source of the blessings. This is as in (Proverbs 28:20), “A man of faith, many are [his] blessings,” and as in (Genesis 2:3), “God blessed the seventh day.” But the blessings are only complete when he receives it from the source of blessings. Because of this, it is written that there are only six blessings and eleven: to show that they lack perfection.
וְזֶה שֶׁאָמְרוּ חֲכָמֵינוּ זִכְרוֹנָם לִבְרָכָה (מכות כד): בָּא דָּוִד וְהֶעֱמִידָן עַל אַחַד־עָשָׂר, בָּא יְשַׁעְיָה וְהֶעֱמִידָן עַל שֵׁשׁ, בָּא חֲבַקּוּק וְהֶעֱמִידָן עַל אֱמוּנָה. לְהוֹרוֹת שֶׁאֵין שְׁלֵמוּת לְהַדַּעַת שֶׁהוּא הַתּוֹרָה, וְאֵין שְׁלֵמוּת לַגַּלְגַּלִּים, אֶלָּא עַל יְדֵי אֱמוּנָה:
This is as our Sages taught: King David came and based it on eleven, Yeshayahu came and based it on six, Chabakkuk came and based it on faith (Makkot 24a). This is to show that perfection of knowledge, which is the Torah, and the perfection of galgalim, is only through faith.
And see the whole discussion there, many important relevant points, for example:
- And know! faith is only lasting because of the concept of brit (the Covenant), as in (Psalms 89:29), “My covenant shall remain faithful to him.” And thus Covenant is associated with Shabbat, as is written (Exodus 31:16,17), “an eternal covenant, between Me and the children of Israel [that… on Shabbat He ceased working and He rested].” And this is (Jeremiah 33:25), “Were it not for My covenant with day and night, the ordinances of heaven and earth I would not have appointed.” For the ordinances of heaven and earth—i.e., the galgalim —are dependent upon the Covenant.
Which relates to Yosef who is the archetypal Tzaddik and Shomer haBrit, on which blessings depend as explained. In fact, if you asked Yosef would he say he suffered? If I recall right, Yosef did not complain. (Gen. 50:20) "And as for you, ye meant evil against me; but God meant it for good, to bring to pass, as it is this day, to save much people alive." He even tells the brothers to not fear, and comforts them! (ibid. :21) "Now therefore fear ye not; I will sustain you, and your little ones.' And he comforted them, and spoke kindly unto them." ... and proceeds to bless them (ibid. :25).
Yaakob's episodes you mentioned might also relate to the Berit as it's been commented that Gid Hanashe is related to taavot there.
Finally, the concept of קליפה קדמה לפרי - the husk forms before the fruit inside - whoever wants to eat the fruit has to break through the husk - you can search here: