The system 4.1.2 now is way more flexible.
Did you notice in your Gcode the process name is stated?
I use the replace to search for the word "-pause"
which I just tack on to the end of the process name. Then is pauses at the start of that process. NO MORE COUNTING LAYERS.
I can even change layer rez and it will still pause at the start of the right process. I don't have to worry about counting layers any more.
This way I don't need a bunch of replace functions script to put a pause at each layer.