That's an excellent story that illustrates a great point: I don't remember anything that I was spanked for doing, but I remember countless of those teachable moments like you describe where a lightbulb goes off.
Spanking erases memories, it doesn't teach lessons.