The problem is not arming the crew, but dealing with foreign countries when the ship comes into port. If the ship is not a warship, the firearms aboard must be declared and the paper work becomes horrendous. The other option of assigning armed private guards to each ship is costs that many shippers want to avoid. The crews on these ships are caught between cost cutting bosses and anti gun laws of foreign countries.
You are correct. It would be cheaper and more acceptable to all of the companies and countries involved to hire a few former military and place them onboard out at sea, and then remove them prior to entering port.
It would also be safer for the sailors.
I know this sound counter intuitive, but it is more realistic.
the world needs to get real....Maybe the US can do the whole WW2 thing and make all merchant vessels under the US flag, a semi military organization.