Not really, and partially for the reason you list next. The pirates may believe that one day, if they keep attacking ship, they'll be caught; but the chance of such a thing happening per attack is so low as to be negligible. Traditionally, force is the only strategy that's been effective in dealing with large-scale piracy. That might work to some degree, I suppose; having ships assemble in the Atlantic and escorted by warships thru the Indian at set intervals, but they'd still be vulnerable in the Suez. It would slow down shipping, and undoubtedly there would those who would decide to go it alone, as they'd be paid extra for arriving early. They'd be the most likely targets for piracy. A blockade of the ports in question could also work; that is putting warships 15-20 off the coast and sinking anyone that decided to venture beyond that point.