How does this work with respect to visas and the like? I don't imagine that countries like you coming in to work and earn money without paying any taxes.
Most of those laws apply to people who are earning money locally. All around the world, it's a huge grey area when the work you are doing as a visitor is not local -- such as working for a client back in the US.
Since in all my travels, I've never found a country with a clear explanation of what is & isn't allowed wrt remote work, I think of it like this: If you are on a trip and somebody from home calls you to ask you to make a decision on an investment, would that country tax you? No. If your investments back home made lots of money while you were on vacation, would that country tax you? No. What if you wrote emails telling other people what to do? What if you did a little bit of it for them? Etc. The thought experiment goes on.
Since in all my travels, I've never found a country with a clear explanation of what is & isn't allowed wrt remote work, I think of it like this: If you are on a trip and somebody from home calls you to ask you to make a decision on an investment, would that country tax you? No. If your investments back home made lots of money while you were on vacation, would that country tax you? No. What if you wrote emails telling other people what to do? What if you did a little bit of it for them? Etc. The thought experiment goes on.