OK, so the AppleScript required to click that menu item is quite simple:
click menu item 8 of menu 1 of menu bar item "Bookmarks" of menu bar 1
To come up with this particular incantation I used UI Browser.app (there's a free Trial). In UI Browser.app choose your Target app, use the column browse to find the menu item you are interested in, then use the AppleScript dropdown to copy the required snippet to your clipboard (or press Alt+Cmd+T).

I made a small edit to the snippet to reference only the Bookmarks menu item by name.
The AppleScript snippet needs to be dressed up a little more to be useful:
activate application "Safari"
tell application "System Events"
tell process "Safari"
click menu item 8 of menu 1 of menu bar item "Bookmarks" of menu bar 1
end tell
end tell
The works for both Safari and Safari Technology Preview, which is nice.
Running this in, say, macOS Script Editor.app will remotely click the referenced menu item and display the expected conformation dialog.

Note: you could add additional AppleScript to manipulate and/or dismiss the confirmation dialog; I'll leave such changes as an exercise for the reader.
Finally, we need to add a shortcut key to access the menu. There are a number of different ways to do this and choice will depend on personal preference and/or software at hand:
- Alfred: workflow with NSAppleScript Action + Hotkey Trigger
- Keyboard Maestro: AppleScript Action + hot key trigger
- Automator: Service + Shortcut key via macOS System Preferences (see this answer)
- FastScripts Lite (free for up to 10 shortcut keys): shortcut
Note: it is no longer possible to assign a shortcut key to an item in the macOS Script menu, so I've not included that method of calling the script.
The last of the options above, FastScripts Lite, is the one that comes for free, and also the easiest method, so I'll use it in this answer.
Enter the above "activate...end tell" snippet into macOS Script Editor.app and save the resulting script to ~/Library/Scripts/Applications/Safari/Save Bookmarks for Current Window Tabs.scpt
.
In FastScripts Lite.app you'll now have a menu item that is effectively an alias for Safari's "Add Bookmarks for These X Tabs..." menu item, and that can be assigned a shortcut key using FastScripts Lite.app > Preferences > Script Shortcuts.
