I would never tell my children to always assume good intentions from strangers. One of my dear friends had her child murdered when she was 7 (our daughters were the same age). How did your kids know when it was ok to talk to strangers? Did they only do this in your presence? (no sarcasm here!)
When my children were small, we interacted with strangers together. By the time they were old enough to leave my side and venture out independently, I could be confident they were capable to handling themselves in most situations. My son was managing a once-weekly paper route by nine.
Why did I take this approach? I was molested as a nine year old. I had to go to court to testify. I learned that people who are close family friends, people who have the key to your home, people who are trusted by your parent, can be predators. Just because someone is a friend, that doesn't mean they won't hurt you. Just because someone is a stranger, that doesn't mean they won't help you.
Yes, I WELL understood that strangers were a LOT less likely to hurt my child, than anyone they knew and trusted in their daily life - teachers, coaches, scout leaders, pastors, neighbours, parents of other kids... When I had kids, I decided they needed defences that were a heck of a lot more comprehensive than just "don't talk to strangers".
Matter of fact, I've come to believe there are few things MORE harmful to teach your child than, "Don't talk to strangers." I feel really quite strongly that by teaching this idiotic mantra to your children, you are making them vulnerable. You're setting them up to be hurt. You're cutting them off from the very people who could keep them safe, in the event of an emergency.
Strangers are the people who will help them when they are lost and alone.
Of course, I taught my children to understand boundaries and limits. I taught them that they didn't have to be obedient and do what someone says, just because they're older, or a teacher, or a coach. Don't get in anyone's car, even if you know them, without asking me. Don't go into someone's house without asking first. Don't run off with friends, without asking. No kissing grandma, if you don't feel like kissing grandma. I taught them to be suspicious and ask questions (something that came naturally to one kid, not so much to the other).
But I also taught my children that strangers are their first line of defense against predators.
We had games we played. I'd challenge the kids to "pick your stranger". Look around. If you need help, who will you ask? That mommy with her kids? Good idea! She's already got kids, she doesn't need more. That daddy? Also, good! How about that person working in the shop? Not bad, they're on the job and they likely have access to a phone. A bus driver! A city worker! These are all people who will help you.
I also taught them, "No! Stop! Go!" If someone is doing something that makes you uncomfortable, you tell them, NO! You tell them STOP! And you GO find a trusted adult to tell about it.
I'm very sorry if your friend's child was murdered by a stranger, but the odds of that happening are significantly less than getting hit by lightning. The vast majority of children are molested and murdered by people they know very well. Teaching them to fear strangers makes no sense at all.
We need strangers. That's what being part of society is all about.
(Oh, and I know you don't much care for my book recs, but I have to rec this one anyway, as he does a much better job of articulating my approach to this than I ever could:
http://gavindebecker.com/resources/book/protecting_the_gift/ It's not just a parenting advice thing - it applies to you and me, as adults, as well.)
Edited to add: Of course, if your child is not neurotypical, then it's entirely possible nothing I've written applies to you. Every parent knows their particular child's capabilities best.