Given how hard it'd be to maintain and support a ship via piracy, it'd take quite a bit of unprotected trade to support piracy, and not much contraction to make it non-viable. It could justify the lack of inter-polity trade, though. Inside a polity, the traders are protected. Outside, they are not.
Another potential issue was a lack of interstellar polities during the Terran Mercantile Community (and piracy) era. The wiki page for
Rim Province claims (albeit without a book source) that in -1690 the provincial fleet was disbanded and assets distributed among the local worlds (and the TMC). According to
Rim of Fire -1500 was when the pirate attacks began forcing the TMC to contract, -1400 was roughly when the attacks ceased due to lack of targets, and -1110 was when the TMC became the OEU, an actual government rather than just a set of trade agreements.
Looking at the TMC a bit more before switching to the large polities in general, a couple hundred years of growing isolationism could have played a large factor in the TMC's inability to stop piracy, since their ROM ships would be getting worn (or entirely out of service). Without government shipyards of their own, they'd be dependent on buying warships from worlds that don't really care about interstellar affairs or on arming merchant vessels.
AM6 claims the Dingir League and Easter Concord date to around the same time as the transition from TMC to OEU, so for almost 600 years there weren't large-scale polities (except for the Vegans) that could draw on the resources of multiple systems. There were probably some minor alliances, but on the scale of two or three systems rather than fifteen or twenty. The TMC could draw on some of the resources of multiple systems, but wouldn't have had the same level of control.
That situation would also give the individual worlds a strong chance of running into funding traps where maintaining old ships would suck up too much money to build new ships, assuming they have (and maintain) shipyards that can build completely new ships (
Rim of Fire's "Deep Night" section talks about worlds occasionally refurbishing old ships for exploratory missions as if it was the pinnacle of their capabilities). Each system can only rely on whatever ships it's capable of maintaining and crewing, maybe with some assistance from a neighbor if they have good relations or the TMC if their risk/benefit analysis of getting involved comes out in your favor. If you're Terra, with billions of people, that's probably OK. If you're a world with a population in the millions or the hundreds of thousands, staffing a navy or even a system defense force that's worth the title is a bit more of a challenge.
It's also plausible that the "end of piracy" was due to the TMC contracting farther than the pirates were willing to travel. The version of the TMC that became the OEU had withdrawn from the worlds closest to Alpha Crucis and Magyar, and the one expansion effort we know about was in the direction of Aldebaran instead of returning to the areas that had been abandoned due to raiding in Arcturus and Dingir. Dingir is somewhat understandable since they were hostile to the Dingir League and Iilike had some sort of "buffer state" between the two, but not moving into Arcturus is a little harder to write off since the Arcturus Federation was all the way on the opposite side of the subsector and they had friendly contact with Scandia at the near edge of the subsector.
Rim of Fire contains a section that makes this somewhat more plausible, talking about how the Third Imperium's early efforts in the Rim only involved the Scouts because the military and diplomatic efforts were focused spinward on the Aslan and Solomani splinter states in Reaver's Deep, Magyar, and Dark Nebula - the three spinward sectors that generated reavers. While it's a fanzine and not canonized, this would also line up with the Library Data from
Traveller Chronicle 6 that states the reaver threat was mostly ended by the last of the Aslan Border Wars due to the Hierate and Third Imperium occupying the majority of the splinter states that generated pirates. That wasn't until 380, centuries after the OEU tried to move into Aldebaran.
(I did not intended to write nearly this much on the subject when I started.)