This is not easy stuff for the casual MQ2/Social user. In fact, no dialog box response is.
Some of the social was easy: /pause 100, /potionbelt activate 3 (Yes, I put the item it in my potion belt).
Then /pause 20, /target npc
Then /pause 10, /say hail
You need all those pauses to give the server time to respond to the commands.
The last part...interfacing with the dialog box itself...was not something I figured out by myself. The documentation for doing that is extremely sparse. I asked a coder friend who suggested that I try:
/notify ConfirmationDialogBox Yes_Button leftmouseup
But this did not work for the Lucky Charm. Pleasingly though, it DID work for making a social to accept raid invites (for those of you that remember, you can raid invite using the simple EQ command /raidinv, but the acceptance of the invite is thru a dialog box).
I was able to find the proper command only because I happened upon it in a forum post at raidaddicts.org. The command listed there is an all-inclusive command that is supposed to hit the accept button for several types of dialog boxes. Here it is:
/squelch /bcaa //multiline ; /notify ConfirmationDialogBox Yes_Button leftmouseup;/notify LargeDialogWindow LDW_YesButton leftmouseup;/notify TaskSelectWnd TSEL_AcceptButton leftmouseup;/notify GiveWnd GVW_Give_Button leftmouseup
Thru a process of guessing, I found the portion that I needed was:
/notify LargeDialogWindow LDW_YesButton leftmouseup
And so using that gave me a working social for using the Lucky Charm. Unfortunately, there is a weakness with my social and perhaps you have noticed it already. The /target npc assumes that the porter fairy is the closest npc. I use this command because I could not figure out a name that worked with the /target command. If you yourself happen upon it then please post it here.

There is obviously a sizable set of options that can be used with /notify, and some of them are listed in the MQ2 wiki at https://www.macroquest2.com/wiki/index.php/Main_Page , but its just as obvious that it's incomplete in explaining the rules of identifying dialog windows. If anyone can find a more complete set of docs, please post it here.
Shoutout to fellow THF player Muergan (a.k.a. the God of E3 Coding for THF), and Kaen01 over at the MQ2 Discord server, for their help with this and with several other things that I needed help with.