Yes, the better way is to make it clear that trying to illegally enter Europe is useless. If there is no motivation to cross the sea in a rubber dinghy, there will be no drowning people, either.
But this is apparently out of the question, for reasons of "humanity".