In this case I am sure my experience and memory is colored by the fact that the teacher was really angry. contrast that with other situations in which the atmosphere was matter of fact and low key ( possibly because it was recognized I was hyperactive ). Secondly I didn’t like and was already ‘apprehensive ‘ of this teacher, the others who punished me were people I liked and/or respected. Finally every other time I admit I deserved the punishment, or at least saw the reason for it . In this case I was sure it was wrong and unjust.
So it may not be the punishment alone that determines memory , but the events and perceptions surrounding it .