Please read and give feedback if you have time other than tl;dr.
From what I can tell you brought back pirate upgrades with every raid. That is good; however there should be a cap to the number of upgrades of each type they can receive. In longer games I have had to withdraw a level 6 Titan and 14 levelled cap ships from a system with regular numbers of troops because they were losing too badly. I even kept em out of WP range. They become nearly impossible/very difficult to take out. So I have some observations and suggestions.
1. Amend the current tech system. Put a level cap on upgrades to ship stats. 1 Cap should take on 3 pirates not 3 cap to 1 pirate.
2. Expand the current tech system. Add techs that allow for pirate carriers and colony capital ships etc. Makes them interesting.
3. Expand strategic difficulty. Pirates will capture empty planets after defeating all defenders and build defenses. Further a new tech should probably increase the number of ships spawned at each raid level (15/30/45/60/75/90/105) and another will give a 50% ship boost but break the raid up into two aimed at different planets. (2 levels, 2 raids/150%, 3 raids/200%) Purchased raids will not benefit from the multiple raid tech but will from the ship number increase tech. A third final tech would make the actual number of fleets random and allow for fragments to meet up again at the target. Makes them still frustrating from randomness but keeps the ships from being OP. Also allows them to open multiple fronts.
4. Consequences of not doing something. Pirates may win games especially against newer players (causing frustration and poor peer reviews), AIs (don't ruin comp stomps. Pirates are a fun mechanism.), and for the TEC Revels. On the last one. It is possible to buy raids against their planets after they become neutral. (The bug.) It essentially becomes a free defense fleet. Further if the pirates are defended they have no reason to not turtle for them until they are usable as a cheap battering ram.