Well what you could test out to merge it back to the lua script is testing if the object is not only inside objects and characters, but also NOT inside the buttons table...
if ( game.CurrentObject:getId().tableId == eObjects and not game.CurrentObject:getId().tableId == eButtons )
or game.CurrentObject:getId().tableId == eCharacters
then...
I think its worth a test
I for myself also have the "workaround" solution for my game right now (testing scene object or item in action part). Everything is set up in action parts without lua right now. I agree that its annoying everytime i make doors or want not allow to display the verb coin.
My coin - other than yours- opens on mousehold (like in MI3) so i never experienced the issue you had. But the reason you made the script is a good reason! Ill try it out myself some time and test if this works for me, too. Ive already implemented renaming the buttons name to change the actiontext to something new (e. G. use > press) depending on the objects internal name and some keywords in it (similar to your string.find in your lua).
Would be easy to expand this to checking the door Name and disable the menu then...