It most certainly is illegal and people have been arrested for doing business and also selling things online whilst in Thailand. I am sure a lot of people run online businesses from Thailand with no work permit, but that is their choice to assume that risk.
I have been professionally dressed and harrassed by female IOs....but yes when I fly business class (sadly not all the time) there are never issues......If I could get a long term visa I would...but there are no affordable provisions for under 50s....already had ED visas......Anyways now have a kid, I will follow that route....if no kids, not married, under 50, do not want to pay for Elite, etc.....you are screwed...