OK so far?
Yes.
1. Now, how do I go about integrating this into my existing configuration with all the various activities?
The easiest is simply to manually copy and paste. If you want, you can do the copy by saving the set of scripts to a file then either a) opening the file in a text editor, copying from there and then pasting into each activity or b) temporarily giving each activity the same prontoscript name and reloading the file into each activity.
2. What is the worst that can happen if I do something wrong or the script doesn't work? Permanent damage in any way? I hope that if it doesn't work I can just reload my working config without the M script. More or less correct?
Yes, correct.