My main concern is really to make a nice script to make runtime
scrips in a different and simple way. Because I don't want to risk
this to happen again. So is there a way to shed the source code
while resaving a script, preferably not scripting the SE?
Use Script Debugger.
You can't *save" a run-only script - you have to choose *export* to
do that.