Sure, don’t give dogs twinkies, but for that matter, don’t give humans twinkies either. The idea makes it seem like dogs are aliens or something. Dog food ingredients are usually meat, grain and veggies, just like our meals. Food that is healthy for you is healthy for your dog, and vice versa.
I’m sorry that happened to your dog. Dark chocolate is different - it has a lot more of the chemical that is poisonous to dogs. Even then, your dog must have eaten a lot.