Arm the merchant ships... and then when any port asks, lie about it.
If asked how they fought off a pirate attack, it was ‘magic’. And dare them to prove it otherwise.
Considering how much guff rogue nations can deliver to the West... that we accept, despite knowing it to be lies, it stands to reason that we can offer the same.
Have the ship’s cook keep several big containers of cooking oil nice and hot at about 210 degrees, just short of boiling, and when these effin pirates try to board the ship, bring those containers up on deck, and dump it on the pirates.
Extra crispy pirate, served with a garnish of their own sh*t, from crapping their pants.