@Mike ******
What you say is partly true, DTV is a no go when your work is connected with Thailand in any way, but there is no need the income has to come from your country of residence.
A third country is no problem, as long as it does not involve Thailand.