I disagree, and the court system is predicated on this idea.

Judging the credibility of testimony is not only one of the primary activities of judges and juries, but, again, I categorically do not believe that you truly believe there is no difference, whatsoever, in indicia or outward evidence, between telling a lie and telling the truth. It's not a remotely credible position to take. It is absolutely the case that humans can be very bad at judging the difference between lying and telling the truth, but the assertion that there is no observable difference is nonsense. It is the reason there are such a thing as "good" actors and bad actors. It is the reason that athletic events in movies are staged, as opposed to actually performed. It is why special effects exist.

Additionally, these judgments are made in context. You aren't judging the atomic, context-less testimony of a spherical witness on a perfectly cubical witness stand suspended in an infinite vacuum. You are judging a human, sitting in a court, in the context of a whole host of other evidence and testimony. So, basically, you are making one of two claims: (1) that humans cannot judge the difference between truth and lies and (2) that it is improper for humans to make these judgments in the context of criminal justice. I disagree with both, but in this case all that matters is the latter - I will cede that it is often the case that humans mess up on individual judgments, but this does not mean that putting humans in charge of these decisions is not the best option we have when it comes to criminal justice.

What you are pointing out is that justice gets tested at the edge cases - and what we have here is an edge case. I understand the engineer's desire to have proof-positive, objectively testable indicia to differentiate between different case-states - in this instance, the difference between being a convincing liar and telling the truth - but that is the central reason we have a court system that is populated and run by humans and not machines. Our "best guess" is what it comes down to. This does, in fact, result in miscarriages of justice - there are supposed to be correcting mechanisms built into this system to compensate for this as well, and the general release-valve for these errors is the idea that you are supposed to be innocent until proven guilty. We have, in fact, stumbled upon a bug in this system here - judges can incarcerate individuals for contempt indefinitely, and this should not be the case. There are other factors going on in this circumstance that render the issue more complicated, and there are ways to address this bug with procedure - hearings, appeals, evidentiary testimony or expert testimony - but to simply state that the solution is to make the system recognize that it is impossible to tell the difference between truth and lies is an absurd notion that totally undermines its very foundation. It is not just throwing the baby out with the bath-water - it is then bulldozing the house too.

It is a primitive, or axiom, of the court system, that humans can be asked to make value judgments about the truth and falsity of assertions presented to them and to judge the veracity of the witnesses making those statements. If you categorically disagree with that axiom, you disagree with the entire jurisprudence system. In this case, I'd like to quote Churchill, when talking about Democracy:

"It's the worst form of Government, except for every other."

If you have a better idea about how to run the court system, I'm all ears.