Yes it’s true, but Bangkok’s no longer the Venice of the East. Most of the canals have all been filled in to make roads. Most of the ones that are left are on the other side of the river in Thonburi district, but the Saen Saeb Canal is still a major thoroughfare cutting across the side of Bangkok proper. By all accounts the water is horribly filthy, and I never take the boat there.
You can also find a few smaller open sewers in the city. There’s one close to where we live, and there’s a good-sized sidewalk food area set up right alongsode it. Yuck! We never eat there.
I have eaten street food in the Mid East (Syria, Iran, Dubai and lots of others) and have never had any issue.
Oh, this reminds me of “Shit River Tacos” (our name for the place) outside one of our plants in Mexico. It was easy and quick to walk to, and quite tasty. We tried to never think about the possibility of particulate matter in the air that might settle onto the food. AFAIK no one ever got sick eating there.
It comes down to you do have to eat and you have to choose something.
In a third world country a sit down restaurant is probably not regulated in any way either. If your there as a tourist you can stick to the hotels that cater to foreign clientele and have your best chances, they aren’t as likely to take chances, as sick guests don’t inspire future recommendations. If you’re living in a third world county you might not have access to such a place. In some cases a street vendor might be a better option if you can see what they prepare and the conditions they do so in.