Yeah the pirate navies are messed up currently. but either change the desc_strat files as suggested (9999 works perfectly. I've had 0 problems with that in all my campaigns). If you want a mid-game fix, just use auto_win. Sadly you can't do that for the A.I; at most you can compensate by giving them more money to replace their always sunk naval plans.

The A.I has 0 ability to do anything by sea because of these unrealistic navies. The RTW A.I already sucks badly enough, there is no reason to hurt them more. Historically pirates could not take out the navy of a giant empire. They weren't some extremely organized force that grouped together and overwhelmed the enemy, but rather targeted civilian/merchant ships and if they did try to fight a real navy, it would not have been with a massed force, for that would surely have spelled defeat.