I have seen free lisps out there (other than express tools version) that will convert standard text back to Mtext. So, my thought is that you might write the program to select all desired mtext objects, while storing their mtext box extents for each in a list bound to a variable (I'll call it MEXTENTS).
Then, convert the lines of plain text to whatever you want, and finally, have the program select the various groups of text using the coordinates from MEXTENTS , then reconverting those groups back to mtext using the mtext conversion code as a subroutine.
A few steps, but it should get the job done. You could run something like that in a script.