Your question is comprised of two parts, 1) Why do we invite these specific guests? and 2) What is the connection between Sefirot and Sukkot?
The first part of your question relates to an overriding, general theme of Sukkot. That theme is the (essential and critical) unity of all of the Jewish people. That each and every individual is needed and is part of the perfect whole.
And that idea also relates to the special guests (Ushpizin) who visit every Sukkah. All of the guests come each night with the group being led by the select individual for that particular night.
Each of the guests relates and is connected to every Jew. Avraham, Yitzchok and Yaacov are the Avot (אבות, אב). They are the precursors to, source and ancestors to the entire Jewish people.
Yaacov Avinu introduces an additional concept of being the Nasi (נשיא) of the entire Jewish people. The Nasi (literally Prince) is like a precursor to being a King. The word, Nasi, is actually a Roshei Teivot for נ״צוץ ש״ל י״עקב א״בינו. The idea that that the Nasi is compared to the entire generation follows the explanation from Rashi to Bamidbar 21:21.
Similarly, Yosef HaTzaddik was the leader of the entire jewish people in Egypt and second to the King of Egypt, Pharoah (Bereshit 44:18). This was the subject of his dream that was recounted in the Torah to his brothers and his father. That they would all bow down to him and acknowledge his ultimate authority over them.
This same principle continues with Moshe Rabbeinu who was the leader of the entire Jewish people and the one who transmitted the entire Torah to all of the Jewish people at Har Sinai.
Similarly, his brother, Aharon, represented the entire Jewish people as the Kohen Gadol in the Mishkan as they traveled through the wilderness. The names of each of the Tribes are before him as a constant reminder on his Priestly garments. And in fact Moshe and Aharon are compared to each other and are of equal value. They served as the vehicle through which the Jewish people traveled from Egypt to the land of Israel serving like a pair of legs.
And finally, there is David, the paradigm in the Torah for the Jewish King. Like with the others, the King is associated with very single Jew, like Rambam points out in the Mishnah Torah, Hilchot Melachim, that the King is the Heart of the entire nation.
The second part of your question is trying to understand what the relationship of the Sefirot are to Sukkot, and for that matter, to the guests themselves. What follows is based upon a series of Chassidic discourses from the 2nd Lubavitcher Rebbe (the Mitteler Rebbe, Rabbi Dovber ben Schneur Zalman) dealing with Rosh HaShanah, Yom Kippur and Sukkot. The first begins with the words, "להבין שרש ענין חג הסוכות". The 2nd begins with the words, "יצחק בא מבוא באר לחי רואי כו׳".
Sukkot is a continuation of and a revelation within the world (עולם) of what was begun on Rosh HaShanah (Crowning G-d King) and Yom Kippur (Sealing the decree of the King when the smoke from the incense offered by Aharon in the Holy of Holies fills the space and creates a cloud on the ceiling like the Skach in the Sukkah). That incense must contain all of its ingredients or one is culpable even to death.
Like with any aspect of the universe, it all follows the organizational structure set up by G-d (מערכת אלקות).
This is part of our intention when we recite the 2nd sentence of Shema, "Baruch Shem Kavod Malchuto l'Olam Va'Ed." That "Baruch Shem Kavod Malchuto" pertains to the intellect, the four Brains. Intellect is only for oneself. It is concealed from others. L'Olam (לעולם literally to the world) corresponds to the Middot, the emotional attributes. It is the beginning of transmitting that private intellect to another. And finally, Va'Ed (ועד) corresponds to physical, material expression of the King's decree through action, Malchut, like building the Sukkah with Skach and dwelling in it and taking up the 4 species (Lulav, etc.). In fact, (ועד) has a value of 80 (פ, mouth) which all alludes to the Oral Torah which is the explanation of how to perform the commandments (the decrees of the King).
The part of that organizational structure which pertains to the aspect of World (עולם) and physical, material existence is the Sefirot which are associated with the Middot (Emotional traits), Chesed, Gevurah, Tiferet, Netzach, Hod, Yesod and Malchut (Action on a physical plane).
Similarly, the appearance of each of the guests follows that same organizational system. Avraham with Chesed, Yitzchok with Gevurah, Yaacov with Tiferet, Moshe with Netzach, Aharon with Hod, Yosef with Yesod and David with Malchut.
The variation in order of Yosef, coming after Yaacov or coming after Aharon relates to whether one is considering the beginning or ending of that revelation.
To understand, consider the physical form of the human body which is also compared to the Sefirot (See the teaching from Eliyahu HaNavi found in the Patach Eliyahu prayer said on Erev Shabbat.). Yesod, (pertaining to Yosef) is called Siyumah d'Gufah, the conclusion and purpose of the body (תכלית), meaning reproduction, to make new life. It is also the limb of the body that actually makes the unifying connection to another at the moment of conception (to be one flesh).
And yet, the legs, which correspond to the Sefirot of Netzach (Moshe) and Hod (Aharon), extend down below the reproductive organ, (meaning they come after) Yesod (Yosef). They give one the greater ability to interact with, to travel, and to walk within the physical, material world.
So from one perspective (chronologically), Yosef, meaning Yesod, comes before Moshe and Aharon. And from another perspective (Tachlit, ultimate purpose) he follows them because he is their ultimate point, fulfilling G-d's will, revealing G-d's kingship (Malchut, David) in the physical, material world and choosing life. This dimension is also alluded to in the Torah (Bereshit 44:18) through the story of Yehudah, the tribal precursor to David, approaching Yosef in Egypt and the repetition of the concept as found in the Haftorah (Yechezkel 37:15-28) which is discussing the final redemption through Moshiach (ben Yosef and ben David).