It WILL end piracy of cargo ships, mind you it will take decades for the entire fleet to be automated, but when more than 3/4 of the fleet is automated the pirates will go find their new criminal enterprise.
The lure of profit means nothing when it simply cannot be done. When they can’t take control of the vessel through computers (which of course let’s face it the current round of pirates don’t have technical skills) or violence then there CAN’T be pirates. Of course there will still be criminals, they’ll just have to find something else.
If legal and monetary constraints were removed, a contributer to hack-a-day or instructibles would have it working in no time.