I agree with the first section of Kate Gregory's answer that even if you addressed the stranger #546, you will still have to address #547 and #548 and so on. Addressing one or all of them is just not productive and bears no fruit at the end. Instead, you should focus on your child and direct how s(he) perceives these suggestions from strangers.
I just suggest not to be rude (especially in front of a 5-year-old) to anyone even to strangers [who probably mean well for you or your child in this particular case]. I'm sure you could come up with short comebacks that show humility and reiterate that you know what you're doing. For example: consider the following scenarios:
- Scenario A:
Stranger #1: "Do it x way it's better than doing y."
Simply say: "Could be but I have seen this work better for him/her. Thanks for the advice though."
This response shows that you know what you're doing without having to be rude to the stranger or having to defend your approach.
- Scenario B:
Stranger #1: "You should reward the kid for getting it half right"
just say something along the lines of: "I will, maybe, but for getting it right completely cause I’m sure s(he) can do it. Surely, I'll help him if required."
"Or maybe you won't cause it's too easy for the kid" but this gives you a chance to show your kid that you trust him/her and address the stranger at the same time. Sometimes, you could get the kid's opinion also on the suggestion(s) and explain to him/her why it's not suitable or why you don't agree with it. This will help him understand you better and give him the power to understand the logic. (of course, only after the stranger leaves)
You could always change your tactics based on the stranger's approach and attitude for example: is the stranger rude/condescending/hostile etc, you could take a more stern approach with them but otherwise, take these suggestions as a grain of salt and turn them into teaching/bonding moments for your kid.