I've seen a lot of people have trouble with pirates, and I haven't seen this put out there, so here you go.
You see the pirate timer is approaching 0... so you put bounties on two of your rivals. If they are human you make the bounties higher on both, if they are AI you just need a little bit more on each than there is on you. Then sit back and watch the bidding war between the two players you put bounties on... they will invariably raise the bounty on one another because they can't be the one with the most bounty assigned to them when the pirates launch.
I generally do it on players I am fighting, so I get some of that bounty back.
Ultimately this strategy costs your opponents more than you (most of the time), and it also means that you won't have to deal with pirate attacks while they will.