The solution is simple, let US Flagged ships arm themselves.
That alone will make attempts at piracy drop to 0 against US Ships.
So, how is the Maersk getting home? What if this happens to them AGAIN???