...Where the 5th Amendment would result in a better outcome seems to me to be more a lack of imagination than of accuracy.
Pardon the slightly inflammatory comment.
Say there is a public figure, or an individual whose participation in the community is wholly a net positive. Perhaps they are an Official, the District Attorney, or perhaps they Work for a Charity or an outreach program for under-achieved Youth.
Now, say you have someone that doesn't like this person. Perhaps they want this person's job, or perhaps they were personally affronted or slighted by this person.
Now, perhaps this person isn't guilty of Murder or some other capital felony, but chances are they are guilty of SOMETHING. The individual (Or group, because it could be a group) reports this individual for a crime they know the person committed. The result of this prosecution and subsequently finding the person guilty of something they are in fact guilty of is that the individual in question is removed from the community, or removed from power, resulting in a net loss for the citizenry. In weighing the costs and benefits, this result is a negative as it harms the community as a whole.
This is one example.
Then, take for example, that an individual may have done something that is perfectly legal in many places, perhaps took an ethical stance. Say.... conducted a series of abortions as a doctor, although technically illegal where they reside (This is a theoretical situation, because this COULD happen and has happened some places, particularly during prohibition). Should their technically illegal act result in their imprisonment?
I think the problem with your premise is you are expecting that the ideal society wouldn't prosecute people for reasons that are technically sound, but ethically harmful to the community. The 5th Amendment is to protect individuals who have not, largely, harmed society.
However, it also protects people who have harmed society, because in order to protect the former the latter must also have protections. This is a result of a judicial system that is intended to assume innocence of all individuals, rather than guilt by fiat of presence in the court.
The burden of our judicial system is to prove innocent people as guilty, with the presumption of innocence a forebearance of the law. While this allows guilty people to go free due to the burden of proof as well as things like the 5th amendment, it is also intended to prevent abuses of the system on technicalities such as the examples listed previously.