Before there were trials by jury, there were trials by ordeal.
The ordeal depended on the crime, but if it carried the death penalty the accused could find himself in hot water.
The defendant was forced into a large cauldron of boiling water, and if he survived he was clearly innocent, but on the other hand if he died he must have committed the crime because the Supreme Being hadn’t interfered.
We say that someone in serious trouble is “in hot water”.