For voice scams this is critical. I set up duress codes with all of my non technical and elderly family and close friends last year.
It should be a simple, pink-elephant-type nonsense question and answer that you rehearse a few times in person and make sure they never share with others. “Q: What’s your favorite leprechaun? A: Rutabaga” or something. Even cognitively impaired folks can, with a few rehearsals over a day or so, retain that easily, I’ve found.
Reminding them to practice it when people reach out pretending to be me takes a bit more rehearsal, but I’ve found that it sticks reliably even then.
"You're my daughter? Then tell me the name of your twelth pet centipede."