As you are using the custom menu feature in your code, removing a script from their respective Form, Docs or Sheet is not possible as the official documentation stated that a Script can only make custom menu if it is bound to the document, form or sheet.
As far as I can see, your workaround is the most efficient way around.
References: