What if the pirates themselves hid by posing as civilian freighters? Each civilian ship created has a small chance of either turning or being created with the "pirate" flag (pun intended) and every increment it spends outside military sensors but within some arbitrary distance of another freighter has a chance of "capturing" the other freighter's cargo and possibly turning it pirate as well. Active sensors could reveal pirate ships, perhaps for only a limited time after a piracy action, to prevent your PDC's from just lighting them up whenever they returned to a planet, although you could get fancier here if you wanted perhaps making at a pirate scan a specific move/standing order which requires a small resolution active sensor. Basically, space vampires. Hide in plain sight, corner their victims in isolation, and suck em dry.
This would provide incentive to produce vampire hunters patrol vessels, with good range and a decent active sensor but lightly armed because pirates shouldn't be a match for an up to date military vessel, and to actually use them to patrol shipping lanes. Piggybacking on the existing civilian system would hopefully make it easy to implement and be extensible. For instance, pirate bases could present to the player as civilian mining complexes that would increase the piracy chance but only be discoverable by an active/pirate scan. Hell, the pirates themselves could use a hidden-from-the-player(and exempt from taxes!) civilian shipping line that increased its wealth by capturing other ships cargo and thus built new ships according to how successful it was.
Edit: In fact this might tie in to another minor quibble I have with the game, which is the relative futility of recon operations. Right now a recon vessel just uses the same equipment as any other ship just in a configuration suited to its task, and it isn't able to discover all that much about hostile ships. You can get estimated tonnage and speed and from that you can infer distinctions between military and civilian vessels but not much else. Adding a new "nuclear radiation sensor" (Or whatever the good technobabble would be) would kill two stones. Magazines and powerplants would be detectable by this new sensor at distances (much?) shorter than the equivalent active sensor, only one ship could be targeted per sensor, and it would require a length of time for a target to be fully scanned. This would give additional information about hostile forces without being overpowered or obviating the much better intelligence gained from espionage, salvage and capture. Giving pirate ships lower tech missiles or beam weapons could make them easily spotted by this new sensor, but require some kind of investment outside what a player would build normally.
Edit2: Sorry, I'm kinda running with this at the moment, and this last bit will probably elevate this idea firmly into "pie in the sky" territory if it wasn't there already, but this could also have interesting diplomacy implications. Granting letters of marque to shipping lines against another empire with which you have a trade agreement could be tons of fun as well. Relations would be damaged each time they managed to detect a pirate from your empire within their space, regardless of whether or not you were actively encouraging piracy within their borders. Lax security within your own borders could potentially provoke war, which I really like the idea of because right now its trivially easy to remain friends with NPRs and it would add an interesting 'cold' war option.