Not a lawyer, but my understanding is that refusal to give the PIN (“remaining silent”) would be a valid application of the 5th, but not giving a false PIN. 5th does not imply the right to mislead or lie to someone investigating a crime.
Not clear on anything else regarding the duress PIN but I don’t think a 5th defense would apply.
Note that you apparently have to explicitly invoke your right to remain silent or your silence could be implied as an admission of guilt (thanks to Salinas v. Texas). I imagine you’d have to repeat your assertion multiple times, and the person demanding the PIN will tell you that you can’t use the 5th, will threaten you with arrest and additional charges, etc. Consult a lawyer and get training if you’re doing critical work where you may need this defense.
Hmm, interestingly here in Sweden we have "free evidence" (way of gathering is not considered even if "illegal", however someone doing something illegal to obtain it could instead be charged separately).
As such in a case like the Salinas one, being silent or "pleading the fifth" would be moot as both would just indicate "deafening silence" to the judges since the defendant had been cooperative up until that point.
(the Swedish judicial system has no juries, instead there's a professionally learned judge and 2 "laymen judges" appointed from political parties acting as the peoples representatives, if that triumvirate fucks up, higher courts can and often will kick rulings back down for retrials).
I'm mixed... if they really thought there was evidence on the phone, they should have seized the phone and acquired a warrant IMO to compel the valid, non-destructive PIN be given over.
As I mentioned earlier, this is part of why my own plans for international travel are to only go with a notebook/sheet with contact numbers and buy throwaway devices on the other side. I don't think I'd travel internationally with a phone or laptop at this point, and that's kind of been my thoughts for a while. Especially given the direction that many countries, not just the US have taken. For that matter, I don't think I'd ever even risk travelling to the UK or China at this point. Not that I like the surveillance state here in the US, at least I still have some rights preserved.