Portable UI Applescript for choosing any menu item through any hierarchy of sub-menus
After wrestling with this for days before posting the above question, it looks like I figured out a solution - I think the act of actually describing the question in detail to post it got my thinking to there.

I'm sharing it for the benefit of anyone else hitting something similar...

My struggle was with the idea that the hierarchical nature meant increasing the level of tell for each item in theSubMenusNamesList.  I couldn't figure out how to put that in a loop without each iteration of the loop going in at that level but then having to come back out at the same level, thus not going deeper. 

This was where Option 3 was a fail from the start, which had me going down the rabbit hole of trying to construct the script in text, to then run with run script.

However, Option 3 is actually the answer - code it direct without trying to construct it in text - but I had to wrestle with that some more to get there.

I eventually realized that I can put each iteration's subMenu into a variable - set to menu item ... of the previous iteration of itself. That successfully goes deeper into each level of the hierarchy without pulling out too early.

Of course if that doesn't make sense, then here's the code, which you're welcome to steal and adapt of course, and which may or may not make more sense... ;) 

on chooseMenuItem(theApp, theMenu, theSubMenusNamesList, theMenuItemName)
    set theAppName to the name of theApp
    activate theApp
    tell application "System Events" to tell process theAppName
        tell theMenu to click

        repeat with theMenuName in theSubMenusNamesList
            set theMenu to menu item theMenuName of menu 1 of theMenu
            tell theMenu to click
        end repeat

        set theMenuItem to menu item theMenuItemName of menu 1 of theMenu
        tell theMenuItem to click
    end tell
end chooseMenuItem


This works for me - tried with a number of different options. For example: As in the original question, call it with something like:

ChooseMenuItem("TextEdit", "Format", {"Font", "Ligatures"}, "Use Default")


Or an example with no sub menus at all, just leave the third parameter as an empty list:

ChooseMenuItem("TextEdit", "File", {}, "New")


Hope this helps someone.