Finally, issue reproduced!
I've finally been able to reproduce and (partly) address the issue.
Whenever TE fails to expand, it is because the TE window was opened (and possibly but not necessarily closed) in a different space from the one that I'm currently using.
To fix the problem, I need to open the TE window, open "Spaces", drag the window into the space that I'll be typing in, and optionally close the TE window.
JoshTheGeek's tip (see five posts above) was on the right track, but on my system, at least, it does not make any difference whether the TE window is open or not. Rather, the problem is triggered by a TE window that was closed or left open in a different space than the currently active one.