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!
What country do you live in that has to worry about people being tortured to death on a frequent basis?
This stuff just doesn't happen often, despite what a silly XKCD comic would lead you to believe.
Encryption actually works pretty damn well, for basically all usecases that a normal person would come across.
The world is not a James Bond spy move.