Hmmm I have really mixed feelings on this. In the past I would think that you could teach children this but now I don't. I think we are looking at the symptoms not the cause. I myself become very agitated when people try to "teach" me because I had an over baring mother(bless her I know she was only doing the best she knew) who was always fixing my problems and fighting my battles even when I didn't need her to and it made me not know how to do things with out her. As a result I gravitated towards a partner of her temperement who acted very much like my Mum and it drove us both crazy.
I've read a lot about white knight/ Florence Nightingale syndrome and I think the onus is very much on those type of people to stopping trying to fix people for their own self gratification as much as it is on the abusive person they feel drawn to. Victim and abuser don't meet by chance its their personalities that are drawn to each other.
If you raise a child to always listen to your advice and not think for themselves and learn from natural consequences then they are more likely to fall into a victim model. Unfortunately for people in victim mode no sense or logic is reasonable and I know because I've been there.
You are best teaching children how to read situations and think for themselves... Part of that though is letting go and knowing pain and mistakes are crucial things to learn so you don't continuously repeat learned behavior.