Weird, I've had just few cases of pirates after I started building hangar bays to protect the trade. I agree, using fleets to suppress piracy is annoying micro, but fortunately you can protect your entire trade network with starbases with hangars.
Somebody, well, a lot of somebodies, only read the wiki and didn't bother to check the tooltips. Missile Defenses and Gun Batteries also provide +1 protection range. Although admittedly, they only grant +5 protection instead of +10 with the hangars, but by the time you get Gateways, overlapping coverage va gateways tends to null that out.