Yeah, but you still get beat with the $5 wrench. And if it was going to work in compelling you to give the password, it will still be pretty effective getting you to provide access to the cloud storage and the encryption password to it.
A couple of people would get beaten with the wrench the first few times it happened, but after a few weeks and a few high profile cases from Fortune 500 employees of "my CIO is the only one with the key", they'd move on to other targets or other methods.
I'm not saying any of this is likely. But, as the topic was raised, if they break you and you start talking, you will volunteer the information. They don't need to know before hand.
That said, the most practical scenario here is to keep your important files secured somewhere else, cloud or elsewhere, and when they ask you to unlock your phone or laptop you say "Sure!" Because there's nothing to find and you're compliant and helpful so they quickly let you go after a proforma search.
Yeah, there is no James Bond outside the books and screen. But thermorectal cryptanalysis is out there and still beats most of cyphers with ease. And it's not letal!
But it will not work if you do not know the password. (It can also be time locked with false data; they don't know whether or not it is the real data.)