In combat, you cannot always be sure to have your power supply. Getting a higher-tech p/s may not be possible, and since it's smaller and MORE vulnerable to damage, might not be desired. So haqving alternate sources of energy is a good idea.
My first thought is to put a cannon near the docking port. Perhaps we'll need several cannons to cover several ports. Why? Generally, when you surrender, you have to shut your power plant down, or at least run it on minimum, otherwise the other guy will blast you until your plant goes off line. Don't want any surprise lasers or meson guns popping up, do we? So since a gun uses CPR, we put a good 90mm gun in a strategic location. The end of the barrel will be flush with the hull, so that it looks like any other water hose hookup or waste discharge.
Enemy ship gets into position to dock and pick up the cargo, you fire your cannon and the enemy ship, if not gone, is going to be seriously hurt. Really, CPR guns are the most effective way to impart damage to an enemy vehicle, and they can penetrate just about any armor as well: you get a big hole going all the way through, and now the bad guy has to worry about multiple breeches.
Just don't miss. You don't want a spiteful pirate vaporizing you with his last breath.
Ok, so let's assume the word gets out about this little trick; it inevitably will, and secrecy was your best weapon. They will find a way to circumvent this. or maybe it will get outlawed, because inspection cutters don't want pirates doing this themselves.
So we plant bombs in the cargo. Go ahead, take what you want, just don't hurt us. Meanwhile, they are command detonated, or in case the enemy ship is shielded against that, we've set the timers to 3 hours, by which time you'll be plenty far away from us, and when the bombs go off, well, we're out our cargo, but so are you. Among other things.
Nukes would be nice, except for those pesky laws against them, and with how easy they are to detect, so we'll have to stick with chemical bombs.
Yes, the bad guys are going to eventually figure this out too, but they are going to have to FIND ALL the bombs and disable them all, and that is going to take them some time. They have to spend it docked to your ship. Meanwhile, the patrols are closing in. Time is critical. They can't afford to waste any, so they will not bother you once they know you've booby-trapped what they want.
Bombs work well to prevent theft of the ship too. Hide it somewhere important, so it will disable the ship (you will want it back some day, and maybe you're stuck onboard), and it's got to be reset every couple days with the right password. We'll tie that to biorhythme too, so only a living officer can reset it.
No matter what cool stuff you come up with, some one will come up with a way to defeat it. The goal is to make it so costly in terms of time or money as to make it not worth the effort. As was said, piracy pays only as long as the goods can be sold for more than it cost to get them. if it costs too much, it's not worth it.
I would have to assume that at least SOME of these ideas are in place, and probably far more. So somehow, piracy still is out there, and still pays now and then. It can't be all that common, though. The more powerful your pirate ship is, the less room you have for the stuff you want to steal. Piracy is usually done in port, where there's less pirate money at stake.
My first thought is to put a cannon near the docking port. Perhaps we'll need several cannons to cover several ports. Why? Generally, when you surrender, you have to shut your power plant down, or at least run it on minimum, otherwise the other guy will blast you until your plant goes off line. Don't want any surprise lasers or meson guns popping up, do we? So since a gun uses CPR, we put a good 90mm gun in a strategic location. The end of the barrel will be flush with the hull, so that it looks like any other water hose hookup or waste discharge.
Enemy ship gets into position to dock and pick up the cargo, you fire your cannon and the enemy ship, if not gone, is going to be seriously hurt. Really, CPR guns are the most effective way to impart damage to an enemy vehicle, and they can penetrate just about any armor as well: you get a big hole going all the way through, and now the bad guy has to worry about multiple breeches.
Just don't miss. You don't want a spiteful pirate vaporizing you with his last breath.
Ok, so let's assume the word gets out about this little trick; it inevitably will, and secrecy was your best weapon. They will find a way to circumvent this. or maybe it will get outlawed, because inspection cutters don't want pirates doing this themselves.
So we plant bombs in the cargo. Go ahead, take what you want, just don't hurt us. Meanwhile, they are command detonated, or in case the enemy ship is shielded against that, we've set the timers to 3 hours, by which time you'll be plenty far away from us, and when the bombs go off, well, we're out our cargo, but so are you. Among other things.

Nukes would be nice, except for those pesky laws against them, and with how easy they are to detect, so we'll have to stick with chemical bombs.
Yes, the bad guys are going to eventually figure this out too, but they are going to have to FIND ALL the bombs and disable them all, and that is going to take them some time. They have to spend it docked to your ship. Meanwhile, the patrols are closing in. Time is critical. They can't afford to waste any, so they will not bother you once they know you've booby-trapped what they want.
Bombs work well to prevent theft of the ship too. Hide it somewhere important, so it will disable the ship (you will want it back some day, and maybe you're stuck onboard), and it's got to be reset every couple days with the right password. We'll tie that to biorhythme too, so only a living officer can reset it.
No matter what cool stuff you come up with, some one will come up with a way to defeat it. The goal is to make it so costly in terms of time or money as to make it not worth the effort. As was said, piracy pays only as long as the goods can be sold for more than it cost to get them. if it costs too much, it's not worth it.
I would have to assume that at least SOME of these ideas are in place, and probably far more. So somehow, piracy still is out there, and still pays now and then. It can't be all that common, though. The more powerful your pirate ship is, the less room you have for the stuff you want to steal. Piracy is usually done in port, where there's less pirate money at stake.