It's not fantasy. Fantasy is a world where you can tell the police "I know how to open that thing that you have a lawful order to investigate, and you don't, so any crime of which I'm suspected is now uninvestigatable, nanny nanny boo boo". The analog with other difficult locks is just fine; the fact that these locks are
so good that they are unbreakable doesn't really change anything about the accused's obligation to cooperate with lawful orders.
The protection in the Fifth is to prevent a perverse system of coerced confessions, where innocent people can be placed on the stand and forced to falsely confess before the court. This has been expanded to preclude other types of unreliable confessions. Impeding the execution of a legitimate warrant, even when that warrant is issued in order to obtain evidence to prosecute oneself, is not protected by the Fifth Amendment.
The Fifth is not there to allow criminals to get away with things, antagonize the police, or make it hard for society to maintain order. It's not there because keeping "one innocent person out of jail is worth 50 guilty going free" or similar sentiments that are frequently expressed. It's there to prevent a common corruption in the justice process.
>Why should the innocent defendant be made to languish in jail indefinitely because the police/prosecutor are inept and incapable of doing their job without reverting to unconstitutional tactics?
Because he's violating a lawful order. If the accused wants to challenge the legality of that order, he can file a lawsuit to do so (and from the article, it sounds like he has). But unless the judge supervising that lawsuit issues a stay on the order in question, the accused is still obliged to comply and can be detained based on his/her refusal to do so.
Reformation of the contempt of court power is probably reasonable, however. This guy should be charged with obstructing justice and tried instead of kept in prison indefinitely. It'd probably be good to set an upper limit of something like 12 months on contempt of court detainments.
I'm not a lawyer.