Interesting that this was just kind of blipped over.
Hot sauce is a food. It's edible, non-toxic, designed to be taken internally. The sensation and taste it creates in the mouth can be unpleasant for some but it's not "pain" in the sense of spanking or burning like some people here are calling it, any more than the extreme sour taste of a lemon is pain.
Some hot sauce is not as mild as you are implying, especially to a young child.
And there is a difference between inflicting pain purely for its deterrent effect and providing discipline that is intended to teach a child life skills, not that Mom and Dad inflict pain if they are not obeyed.
Discipline should teach, not simply deter. Kids who learn, don't do [X] or my parents will inflict pain do not learn to not do [X] when the child doesn't think the parents will find out. Discipline that teaches has a more effective long term outcome.
The street is dangerous is not conveyed by: going in the street gets me spanked. I know it seems like the child should connect the two, street and danger, because there is a danger of being spanked. But from the child's perspective, the lesson was, Mom or Dad wants obedience. Why would they hit me if they cared about me getting hurt? A better message would be to limit freedom and choice. I can't trust you to stay out of the street so I have to limit your ability to choose to run into the street. Loss of freedom is a very effective means of discipline, especially if other kids the child can see are free to choose.
You want socially unacceptable behavior like cussing or hitting to result in social withdrawal, not more hitting. When spanking is used as the consequence of a child acting out, the child learns, well I didn't get the kind of attention I wanted, but I did get attention. Unacceptable behavior is when time outs make sense. You don't behave, you don't get more attention, you get less.
There are dozens and dozens of kinds of outcomes besides causing fear or pain that teach rather than simply deter through punishment.