I have eaten street food in many places where I travel. Maybe I have just been lucky but I have never gotten sick and I have had many good cheap meals.
Here is an example, a vendor on the corner by the beach. They use fresh local fruit to make a juice drink or fruit salad. In the trailer is a small kitchen with a stove and they fry up little fish or meat pies that were delicious. Yes you can get fries with that. They also cook noodle and rice dishes. I could see behind the rig a station for washing up. The workers were clean, just a couple of things to look for. Are their hands, equipment and clothes clean? If so then I feel good about eating there.