I have never denied that the op needs a toggle for it. A closer look at their workflow might be a reason for them experiencing slow down.
I'm not a scripter either so I haven't offered any advice in that area.
The only thing I can do is offer advice on workflow and examine how their workflow may be causing some slowness with the app. And in my experience copying and pasting from InDesign to Illustrator or Photoshop or vice versa can cause slowness.
This is a forum - sometimes you ask a question looking for a particular answer. Sometimes there is no answer to the question.
If it needs to be scripted they can ask in the scripting forum InDesign Scripting