You don't need script inside script. The core debug node uses a script tag to load another file: https://github.com/node-red/node-red/blob/c7587960fbfe77a1609e7c3c29705bc1d5918dc3/packages/node_modules/%40node-red/nodes/core/core/58-debug.html#L34
@Holger-Will I'm not clear what you are asking for here that you cannot already do?