If you actally read reports on piracy (they publish ‘em on the net) a lot pirates are stopped by alert crews and high-pressure hoses. Alert crews and autocannons might go a long way toward putting them out of business.
Of course the only way to actually put them out of business is to pursue 'em into their home ports and burn the port down around the ears of the pirates and their supporters. Nobody really seems to have the balls to do that any more.
The notion that some guy standing on the bridge periodically glancing at the scope is enough is simply not realistic.