Another small change could help here. how many Somali pirates get to claim insurance on thier boats when the police/navy sink em? thats right. So... how many space pirates get to claim insurance when they unexpectedly lose a fight?. should be similar numbers yes? it would make them think about wether or not to take thier fully decked out anaconda into battle with the thought that if they lose they lose the value of the ship....permanently. there would have to be a sliding scale i suppose. small wanted - little effect on insurance. middling wanted - big effect on insurance. big wanted - no insurance and a fee for bringing your bad ass back to life in a station^^( sliding scale for the fee too. to pay of the doctor who brought the Dread Pirate Roberts back to life when the universe was better without him)
As to the idea of pvp flagging. just have it so the toggle for it is in station comms only. so you cant turn it on or off while out and about.
That seems a bit...harsh. I don't say that because I don't think Griefers deserve it, mind you. I think they do, but I don't think it would have the effect you're going for. For one, that would be a MASSIVE hit to RPers. RPing as a Pirate is a legit thing. Second, it doesn't address the issue of the people who grief the players that they know can't fight back, they'd find a way to game that system.
Besides, if there is a PvP opt-out/in toggle like turning friendly fire off, it wouldn't be as necessary to punish PvPers that want to RP as Pirates or whatever because it would be safe to say that anyone who chooses to turn their PvP flag on is giving people permission to engage them in PvP.
It would also need to be something that people can turn on and off while undocked and outside of combat. It would be a good idea to do that so if someone comes across a brewing "world PvP" battle while they're flying around, they can just turn on their PvP flag and jump into the fray spontaneously without having to dock at a station, turn it on, undock, and get back only to find that people have left the area.
You'd also want it to be able to be turned off while undocked for a variety of reasons, such as maybe you just forgot to turn it off earlier, or you're out in the middle of BFE nowhere with a bunch of loot you weren't expecting to find or a crapload of exploration data and now you need to go somewhere to sell it, preferably without being blown up by some random yahoo in open play... Or maybe you just decided that you're not interested in PvPing after your last fight.