So maybe boiling oil isn't such a bad idea.
Would spearguns at ready be legal? Or crossbows or other such fish archery equipment?
If you are in compliance with USCG regs you should be carrying a flare gun or three. Flares can do significant damage if they hit a human or boat.
Most of these pirates have AKs, many have an RPG and sometimes multiple rounds for it.
Engaging people with AKs with a flare gun is not a sound tactic.
Expecting to let them get close and even board and deal with them with boiling oil or spears is also going to be relatively ineffective.
While it is certainly good to plan for a means of self defense, realistic results against the likely threat must be considered.
A good rifle could keep pirates in small unstable speed boats at bay.
Aiming RPGs or Aks while hitting swells in the open ocean is certainly going to be difficult, while doing the same from a larger boat less effected is easier.
However once someone lets hostile pirates on a speed boat get alongside their vessel they have lost most of their possible advantage even with a gun.
It doesn't take much to aim full auto AKs or an RPG from 50 feet or less.
1: Rules of engagement. On shore, armed self-defense happens from a few yards to contact distance. What is a threat is more easily determined. At sea, by the time a threat can be definitively determined, the tactical advantage is lost. Making the determination at a tactically sound offset is obviously going to result in a lot of false positives, the result being collateral damage (or as it is known to civilians- murder).
Not true. On the open ocean a vessel that takes your heading or one that is clearly intended to bring them to you and involves maneuvering towards you is unmistakable.
Near shore may be crowded, but dozens of miles from shore it is quite obvious if someone is trying to come to you.
Few people are going to rush up to you on the open seas. Those that do are typically intending to board either to inspect or muscle you as members of some branch of LEO of the local government, or as pirates.
If someone is speeding up to you in the open ocean and not answering on a radio when you call out to them, anticipate hostilities. Unless they are clearly lost at sea there is no reason a small speedboat should even be in the open ocean, much less with plenty of fuel on a short range craft.
The best way to survive a pirate attack? Don't sail where pirates are in the first place.
It should be noted the most recent Americans killed were captured hundreds of miles (open ocean) off the coast of Oman.
Oman is itself hundreds of miles from Somalia.
To go from the Indian Ocean to Europe essentially requires going through the Gulf of Aden (next to Somalia) and traveling through the Red Sea.
Otherwise a person has to go all the way around Africa.
The 4 killed were closer to the Gulf of Oman, hundreds of miles away from the Gulf of Aden and from Somalia when captured.
These pirates are going thousands of miles now on trips searching for prey.
Another big factor for a sailboat is working with the wind. There is only so many practical routes someone can take, going against the wind can increase the time required several fold and the winds of the world can be readily researched. They generally flow in certain directions in any region.
A large motor powered cruiser costs a fortune to use just for private cruising in fuel, and maintenance of the big powerful engines a lot more expensive than a sailboat, so most people cruising the world do so in sailboats and are limited to working with the wind.
For example the murdered couple and two passengers were on a 58 foot sailboat.
A 50 foot powerboat sea worthy enough to take on open ocean cruising around the world typically gets about .5-2MPG. Going many thousands of miles at around 1MPG would put the ability to travel out of the financial reach of even most that could manage on a sailboat.