Hanging Saddam wont deter another mass-murderer, tyrant, despot, because they all have this incredible belief in their own superiority, right, whatever they see it as, together with an incredible ego so they wouldn't even relate themselves to Saddam.
Hanging Saddam was right because, as you say, the cost of maintaining him in jail was too high, the risk of escape too great, and the risk of that man free to regain power is something that cannot be allowed to happen. If he was sentenced to a life sentence, being alive he could grow in popularity, develop a cult following, especially with our weird liberal progressive mindset at the moment. With the ridiculous state of the United Nations, it's easy to imagine an appeal on his behalf for his release.
No, dead and buried, to drift away in distant memory and no chance of this one returning.