“They may choose to detain you anyway, and force you to give them passwords to various accounts manually”
This couldn't possibly be true! So effectively you are saying that they can hold you indefinitely and torture you if need be to obtain your Gmail password. Even if you aren't even carrying a phone?
All they have to do is Google search your name from your passport and will immediately see any social media accounts you are using. Once they have your email password they can use it to send password reset links to your inbox for all your social media accounts.
This is quite a disturbing and frightening scenario.