The Gulf of Aden and western Indian Ocean have been piracy hotspots for centuries. Even the Royal Navy in its prime couldn't stop and search all the hooligans, so the policy was deterrence by dealing harshly with all pirates when they were caught; if the bad'uns didn't stop when ordered, they were promptly fired on and sunk, and any pirates captured were usually given short shrift. Any state that supported piracy was liable to be blockaded until its government took effective steps against the criminals that operated from its territory. The US Navy's first official overseas deployments were against the North African states that preyed on American merchant ships. The result was a marked decrease in piracy and a corresponding massive increase in profitable peaceful trade.
So now it's insurance companies' rules and rogue states whining 'unfair' that should dictate policy? Hmmm, that's the tail wagging the dog, when it should be the other way round. Appeasing nasties doesn't work. Merchant ships these days operate with crews too small to spare men for repelling boarders, so place a few under naval command, equip them with effective means to fight and send them into harm's way with a crew of well-trained personnel; a modern version of the old 'Q-ship' tactic. Sail ships together in convoy with naval escort through the worst trouble spots. Advise pirates and anyone who supports them that their attacks will be contested and their lives will end in misery if caught anywhere near a peaceful merchant ship.
Pirates aren't romantic rogues, they're a sore on the arse of humanity - and sores should be lanced before they infect the whole of the body.