All I can say is even if you do manage to get the interaction just right for certain shell A with stty setting B and prompt C on operating system D, sooner or later someone will come along with a slightly different combination, triggering the infinite loop all over again.
Anyway, switching A (with different B and C) allowed me to progress to tramp-get-ls-command errors, which I *do* note have proper limits. So all the lisp invoking "exec env..." needs to do is use the same safety limits, so other people won't trigger the infinite loop. And now changing some settings in .emacs allowed my to progress to other issues, which I'll report in other new threads.
