Forgive me if this has already been suggested, but I have an idea. I only play TEC, so I may be wrong about the other races,
You should play as them a few times, helps you learn how to play your faction better when you know the enemies strengths and weaknesses, as well as how suggestions for improvements to one faction causes balance issues for the other two factions.
but I've noticed that only the military and civilian trees have final level researches, nothing for the defense or diplomacy trees.
If by final level you mean 8th tier research items then you're not quite right. The TEC has 1 for Military, 2 for Civilian, and 1 for Diplomacy. The Advent have 1 for Hostility, 1 for Harmony, and 2 for Understanding. The Vasari have 1 for Warfare, 2 for Empire, and 1 for Manipulation. The Defense, Security, and Fortification trees stop at the seventh tier.
Perhaps a final level diplomacy could be something like "officer exchange program" that increases the effectiveness of all pacts, or allows you to trade ships with allies (no idea how to make that work though).
Pacts are hard coded and we can't mess with them, otherwise we'd have made them much better a long time ago. Trading ships can be done in a round about way by making all ships capturable, but then it means your enemies can capture your ships too, which would be a bad thing. Of course, Advent can already take your ships from you if they so desire so making all ships capturable would remove the uniqueness of the Rapture's Dominate ability.
I've put a little more thought into the Defense final level, it could be one of several things. Another ability for the starbase, but i think they have enough.
I'm not sure if any more upgrade abilities can be added however there are a couple ability slots left on the starbase itself. But like you said, they've already got enough stuff.
Maybe something like "defensive mandate" that increases tactical slots, or gives starbases one or two more ability points.
Giving the TEC more tactical slots would mean that they have upgrades for both, logistic and tactical slots... Unless the other two got both upgrades as well, I don't think it would be fair. Besides, the Vasari have a pact item that does this. So make a Vasari friend. ;] As for the starbase ability points increase, I believe those are hardcoded as well.
And my personal favorites, either an upgrade to the planet based defenses (seriously, have you seen how long it takes them just to take out a couple siege frigates)
Yes it does take time, planet defenses are supposed to slow the opposition down buying your fleet time to come back or support your fleet elements already present, not outright destroy another fleet, otherwise, no one would be able to take out a player with the economy to build up those defenses and there would be no way to achieve a military victory which is the by far most common win condition.
or yet another buff to the lowly gauss cannon, making it a credible threat. (this especially because of the limited numbers you can have, to make space for all those other tactical structures that take more points).
Another buff? They already have rate of fire increases, range increases, burst rockets for hitting multiple targets at the same time, and the meson bolt cannon which reduces opponents armor rating for a short time... It already is the most upgraded defensive weapon in the game. It's hardly lowly, however, the glaring shortcoming is that it's immobile and even after the range increases, still don't cover much space, unlike the hanger defenses that field strike craft, or the orbital defense control that can hit anything in most of the gravity well, but at the cost of 1 tac slot point compared to the 4 and 10 respectively, and the ability to field them right from the start of the game without having to spend time and money building research stations and doing the actual unlocking research, they really are quite powerful for a good amount of time as well as for the price and slot count. You really shouldn't be relying on them in later stages of the game when most people will just go right around them and a better defense option is always the starbase.
Well, that's my brainstorm. Now it's in your hands.