Sends in fleet with 20-40 HC, 3-8 cap ships (or in games where he is in different star 50-80 HC and 16 caps)
Sounds like the primary issue is that he has a far more advanced and powerful empire, and exactly what kind of units he's using is more or less irrelevant. You'd be equally screwed if those were Javelis LRM or Carriers. With such a severe numerical advantage, TEC is going to be very difficult to beat regardless of what he's doing. Instead, you need to focus on your early game to better match his advancement and progress, and pressure him so he can't get his ideal economy running. If you can match him for numbers, TEC is a lot less intimidating in the late-game.
That fleet is actually quite weak and poorly structured given its cost, so it really sounds to me that your big problem is being outnumbered. He's got way too many capital ships for how many frigates he has, and he has no hoshikos. He could make that a lot stronger just by choosing slightly different unit proportions. Basically, the battle was over before the first shots were fired, and he doesn't even need to play seriously at this point to beat you.
The one thing I will suggest is to lean heavily on the Stikulus Subverter against HC-based fleets. This support cruiser can disable large numbers of enemy units, and the relatively short-range of the heavy cruiser causes them to cluster up a bit and renders them vulnerable to this shutdown. This can remove a lot of the enemy's firepower while simultaneously preventing them from retreating. Absolutely brutal in the hands of an expert, and something you definitely want to use.
His strategy has worked w/o fail every game scenario he is put in, because he only needs a few planets to get tier 8 civ research (using the increased logistic slots upgrade.)
This is going to take a long time for him to do, and if his fleet is small in the duration you should have more than sufficient window of opportunity to get your own competing economy operational and attack him before he even reaches the highest-tier economic upgrades. What you need to be able to do is compete in the economic race until the opportunity comes to attack; TEC will have some advantages here, but you don't need to match him, just keep up. If you can bring out a Vasari fleet about 80% his strength, that should be enough to give you a fighting chance.
The best recommendation I have is to stay lean and focus on colonizing rapidly. You should be able to manage one new colony acquisition every 3 minutes on average. You should cut back on technology and infrastructure to maintain your rapid colonization and a fleet to protect it. As Vasari, rushing into more advanced stuff like refineries, broadcast centers, or trade ports is foolish. Avoid investing heavily in defenses this early, since you want to push your borders forward.
I tried using allies of my own, but AI were too slow to respond to his attacks on my planets
AI's, particularly at "hard" difficulty and below, are very slow, inflexible, and worthless as conventional allies. I'd be more inclined to wipe them out in order to take their assets for myself and use their units as experience to level up my capital ships, keeping one alive for pacts. You'll need to be able to stand on your own, expand faster, and get an economy rolling sooner.