So what happens when the pirates manage to take over a ship with that kind of armament? Adding more guns is a bad idea
After being paid millions of dollars in ransom over the last few years, availability and diversity of weapons is NOT a problem for these pirates. Their boats have gotten better and faster. They have sat phones and GPS. You just would not just 'add guns'. If the guns were on board you'd a) give the crew the proper training in their use, storage, and maintenance, or b) supply trained personnel to operate the weapons (most likely).
that was the US police force's response to the US constitutional right to carry arms and the result was inevitable; everyone became more dangerous and every situation became 100x worse. You do not want civilian ships sailing around with guns on board; self-defense weapons like tazors maybe.
A majority of states now allow their citizens to carry concealed weapons, and they have NOT become more dangerous. Most of the problems we have are with crazies that pick places were they know the other people will not have guns, such as schools and universities.
Piracy is the result of economic imbalance - you've got shipping from 1st world nations sailing past one of the poorest countries on Earth. Sort out the problems in Somalia, get a functioning government in place and this problem will go away.
I remember the US and UN a few years back tired to help them set up a functional government. They didn't seem to want the help. There were some opportunistic countries who tried to poach Somalia's territorial fishing grounds, and the Somali's had every right to drive them off, or even capture and hold them. Once they made the jump to outright piracy, they lost any sympathy they may have hoped for.