Disclaimer: I did not fully read every single line of this thread…but hopefully I can contribute a bit of helpful info.
Accessing Scintilla on a background thread can be very problematic. There are Scintilla calls that have temporal coupling and since you cannot guarantee any two calls made from PythonScript (or outside of Notepad++) are executed without being interrupted by another thread, then weird things can happen. Even doing something simple like:
editor.setTargetRange(0, 100)
x = editor.getTargetText()
could potentially give unexpected results. Notepad++ does its own work (search/replace, function list, auto completion, smart highlighting, URL highlighting, etc) which changes the target quite frequently.