I think the way to understand it is that chassidus - piety, represents a level of completeness and perfection on the spiritual scale that exceeds that of techiyas hameisim. In other words, on the individual level a person has reached the apex of his spiritual growth which is why it extends even beyond techiyas hameisim.
Perhaps a good starting point can be found in Mesillas Yesharim in Chapt 18 which is aptly called מדת חסידות - the attribute of piety.
It writes there:
אך מציאות החסידות עצמו הוא דבר עמוק מאד להבינו על נכון, והוא מיוסד על יסודות חכמה רבה ותיקון המעשה בתכלית אשר ראוי לכל חכם לב לרדוף אחריו, כי רק לחכמים להשיגו באמת, וכן אז"ל (אבות פ"ב): לא עם הארץ חסיד.
But actual Piety itself requires great depth to understand it correctly. It is based on foundations of great wisdom and utmost rectification of one's deeds, which befits every wise hearted man to pursue. For only the wise can truly attain it, as our sages stated: "an unlearned man cannot be pious" (Avot 2:5). (Sefaria translation)
So by way of introduction, chassidus is to be regarded as a more elevated level and requires a degree of wisdom and fixing one's ways to truly experience which is why it makes sense that it comes later in the list of Pinchas ben Yair.1
In the Derashos HaRan 5 it writes as follows:
ולפיכך הסכים ר' פינחס בן יאיר שהחסידות גדולה מכולן, כמו שנאמר חסידות מביאה לידי רוח הקדש וכו', ורוח הקדש גדולה מכולן, רוצה לומר שמי שהגיע למדרגת החסידות ראוי לבא מיד לידי רוח הקדש שתשרה עליו שכינה, כמו שהוכיח מן הכתוב (תהילים פ״ט:כ׳) אז דברת בחזון לחסידך. וזה הפך מרבי יונתן שהזכיר למעלה דאין הנבואה שורה אלא על חכם גיבור ועשיר ועניו וכולם במשה, ולא אמר חסיד. ונראה שהוא סובר כר' יהושע בן לוי, שאמרו שם וכו' ופליגא דר' יהושע בן לוי דאמר רבי יהושע בן לוי ענוה גדולה מכולם שנאמר (ישעיהו ס״א:א׳) רוח ה' אלוהים, לבשר חסידים לא נאמר אלא לבשר ענווים, הא למדת שאחר שבעת הינבאו על הגאולה אמר לבשר ענווים, נראה שהם השיגו המעלה היתרה, ולכן תאוות להם הבשורה, כי עם היות שהגאולה תהיה כללית, אין בשורה מוצאת רק לצדיקים, כמו שדרשו בסנהדרין (דף צח) דרש ר' שמלאי מאי דכתיב (עמוס ה׳:י״ח) הוי המתאווים את יום ה' למה זה לכם יום ה' הוא חשך ולא אור, משל לתרנגול ועטלף שהיו מצפים לאורה, אמר לו תרנגול לעטלף אני מצפה את האור, לפי שלי הוא, ואתה אורה למה לך. ולפיכך אמר לבשר ענווים שלחני, כי עיקר הגאולה לטובתם
Therefore R' Pinchas ben Yair agrees that piety is greater than them all, like it says; (in Mishah Sotah 9:15) "Piety brings a person to ruach hakodesh..." and ruach hakodesh is greater than them all. This means to say; whoever has reached the level of piety is fitting to come to Ruach hakodesh as the shechinah (the Divine presence) rests on them. Like we prove from the verse (Tehillim 89:20) "Then You did speak in a vision to Your pious ones". And this is the opposite of Rav Yonasan who mentioned above that prophecy only rests on the wise, mighty, rich and humble, and all of these were in Moshe. And it doesn't mention piety there. And it appears that he holds like Rabbi Yehoshua ben Levi, as it says there: "And this disagrees with Rabbi Yehoshua ben Levi, since Rabbi Yehoshua ben Levi says that humility is greater than them all as it says (Yeshaya 61:1) “The spirit of the Lord G-d is upon me..." It doesn't say to bring good tidings to the pious but rather to bring good tidings to the humble. This comes to teach you that after the prophecies about the redemption it says to bring good tidings to the humble as they have achieved a higher level and therefore the desire of theirs is the news (i.e. good tidings) as this is what makes the redemption more fundamental, and such news is only found amongst the righteous, like they expound in Sanhedrin 98b: " Rabbi Simlai taught: What is the meaning of that which is written: “Woe to you who desire the day of the Lord. Why would you have this day of the Lord? It is darkness, and not light” (Amos 5:18)? It is comparable to a rooster and a bat who were looking forward to the light of day.The rooster said to the bat: I look forward to light, as light is an indication of my time to be active. But as for you, why do you need light?" Therefore it says, "He has sent me as a herald of joy to the humble" - since fundamentally, the redemption is for their good
So we see from the Derashos HaRan that piety is the mechanism through which the shechinah can ultimately rest which could be why it comes lasts in the gemara, and alternatively, if you hold like the view that humility outweighs everything, this is because the level of humility is regarded as a higher state, in which those who have attained this attribute, receive good tidings of the ultimate redemption which is for their own good and conceivably comes after the stage of techiyas hameisim.
Rav Tzadok HaKohen writes in Yisrael Kedoshim 3:3 writes like the first part mention in the Derashos HaRan:
ותלמודין חשיב רק המדריגות שביד האדם להשיג בהשתדלותו. וזה מה שהשם יתברך נותן הוא שלימות החסידות הגדולה מכולן שזוכין לה בעלי רוח הקודש
i.e. the level of Chassidus is regarded as greater as such people are regarded as individuals imbued with ruach hakodesh.
1 Just a possible addendum (my own thought process), in the subsequent chapter, the Ramchal writes:
וזה פשוט, כי הקב"ה מודד מדה כנגד מדה, ומי שמרחם ועושה חסד עם הבריות, גם הוא בדינו ירחמוהו וימחלו לו עונותיו בחסד, שהרי מחילה זו דין הוא, כיון שהיא מדה כנגד מדתו, והוא מה שאמרו ז"ל (ר"ה י"ז): למי נושא עון למי שעובר על פשע
This is obvious, for the Holy One, blessed be He, repays measure for measure (Sanhedrin 90a). Thus he who has mercy and does kindness with others, will also be shown mercy when he is judged and pardoned of his sins with kindliness. For such pardoning is justice, since it corresponds measure for measure to his practice. This is what our sages, of blessed memory, taught: "who is forgiven iniquity? he who overlooks transgression [committed against himself]" (Rosh Hashana 17a).
Possibly this is why it potentially outweighs techiyas hameisim as it impacts on a person's merits and ensures Hashem elicits a measure-for-measure response.)