I'm not sure that merchant vessels are prevented from having defensive firepower. A search on the web brings various conflicting replies. I always understood that merchant vessels were not armed to prevent them from being perceived at a threat. Not that it stopped either side from sinking merchant vessels during times of war. I know that private vessels can carry arms, but they must be secured in an approved safe when landing in a port. And I imagine every country/port has its own regs.
One of the web articles said that merchant vessels are arming themselves with non-lethal defensive weapons. My guess is to prevent revenge attacks should they take out a group of pirates who have friends.
If I were a merchant captain, I'm not sure I'd want to be in unfriendly waters, meaning pirates, and not be well armed. That would include things like a .50BMB, RPGS, LAWS, mini-gun, etc.. Given that most pirates are using much smaller and fragile vessels, short of them sneaking up at night and launching and RPG at the bridge, I would think that a reasonably armed ship could fend off any attackers.
My understanding is that often the pirates take over a ship simply because there was nobody watching. Doubtful you could hear an Achilles with an outboard approaching from the deck of a ship unless they were upwind of you and the wind was bringing the sound to you.