Should parents explain to children that there are adults out there who may have bad reasons for wanting to spank them (even though the adults may tell the child it's punishment for something bad he or she did)? Is so, what's the best way to address the subject so that they'll be aware and sufficiently guarded but without scaring them too much?
There are bad people out in the world period. Children need to understand that they exist, but that every person they meet may not necessarily be bad.
We can use the principle Jesus taught us about recognizing a false teacher. "You will know them by their fruits. Do men gather grapes from thornbushes or figs from thistles? Even so, every good tree bears good fruit, but a bad tree bears bad fruit. A good tree cannot bear bad fruit, nor can a bad tree bear good fruit. Every tree that does not bear good fruit is cut down and thrown into the fire. Therefore by their fruits you will know them" (Matthew 7:16-20).
Thus, a child should understand that they are not to go with a stranger. Mom and Dad are responsible for seeing that they are able to go where they need to go. If someone wants to offer them a ride, they need to get permission from Mom or Dad first.
In the same manner, Mom and Dad are responsible for teaching the difference between right and wrong (Ephesians 6:4). If someone else says something is wrong, then the child needs to come and ask Mom or Dad about it. If they had done something wrong, Mom or Dad decides what needs to be done as a result.
Just as parents will give permission to another to give their child a ride, they can give permission to someone else to be responsible for the child's behavior. For example, if they leave their child with grandparents or a baby sister, they are giving permission to those people to make sure their child behaves. If a parent doesn't trust such people to do a proper job in managing the behavior of his child, then they have no business leaving the child with the person.
You see, a child's life ought to be innocent of knowing all the possible bad things that just might happen. They should be aware that bad exists and that they are to fight against bad things, but it is Mom and Dad's responsibility to shield their child from as much harm as possible. They should not shoulder their child with their own responsibilities.