“Open sesame”: how widely understood is it, and how else to put it?

Solution 1:

It certainly used to be a very common cliche in exactly those same situations in English (at least, in middle America where I lived). Particularly for things operated with openers like garage doors. I'm pretty sure I even heard it used on The Electric Company, which was broadcast all over the USA back in the 70's (when most folks only had 4 TV channels. so every kid in the USA watched it).

I don't recall hearing it recently though, so that may no longer be the case. I can vouch that any USA person in their 40's or older will be familiar with the phrase, though.

Solution 2:

I googled "open sesame" and found hits for

  • An article about sesame oil, titled "Open Sesame (oil)"
  • Mediteranean cooking named "Open Sesame"
  • Garage doors named "Open Sesame"
  • An article in Nature about government openness
  • An article about a business group named Alibaba

Basically, the same phrase is being used all over the place, sometimes in reference to sesame oil (for obvious reasons) and sometimes in reference to opening things that are closed. This suggests to me that the phrase "Open sesame" is well-known enough that, even if not all readers know the story of Alibaba, they at least know the famous pass-phrase.

As far as your other questions, I think it's a common theme in fiction, especially fantasy, to have doors which can't be opened without a passphrase. As some comments have pointed out, The Lord of the Rings had the famous scene where the party was stuck outside the doors of Moria while Gandalf tried to remember the secret word that would open the doors. Many computer-hacking stories also feature password theft or cracking. The password is almost never "Open sesame" in the other stories, though.