In their Evolutionary Psychology Primer, Cosmides and Tooby give an example of a hypothesized adaptation that allows us to detect cheaters in a certain type of logical task (Wason) that we generally fail at. In the Wason selection task (both article and wiki give examples) you are presented a type of logic puzzle that people tend to do poorly at and even formal training in logic helps little, yet when the examples involve cheating (such as "If you are to eat those cookies, then you must first fix your bed" and the task would be to figure out if someone whose eating the cookies did indeed fix the bed) perform much better (25% right in the regular task, 65-80% in this version, according to the article).
In the show The Wire, in season one, episode eight, Wallace, a teen-age drug dealer is asked by a young child to help her with her math homework. It's an addition and subtraction word problem about passengers on a bus (can't remember the numbers, but along the lines of, if the bus has 10 people on it and at the next stop 3 get on and 4 leave, etc.). Wallace rephrases the word problem to be about drugs and the kid gets it right. Wallace frustrated asks why and the kid replies along the lines of: "They beat you if you get the count wrong." (Edit:simpleton gives the quote as "Count be wrong, they fuck you up.")
C&T conclude that there are evolved "algorithms" in our brains that deal with social contract processing that explain why people do better on certain Wason selection tasks. The Wire points out a simpler possible explanation that their experiments did not control for: people do better on tasks they care about, unless one would like to suppose there are special math circuits in the brain for certain "social contract" situations.
Of course, I am not saying a fictional anecdote disproves C&T's claim, but it does point to something they didn't test for, and something that I find rather plausible.
Possible tests: Look at emotionally-motivating things that vary across culture and develop Wason selection tasks to test for that; look at various types of emotionally-motivating things (which I do not presume all emotional responses will affect the test results), and obviously, test The Wire example itself.
The Behaviourists did lots of laboratory work on rats and pigeons. They had spectacular success at building up elaborate behaviours by using positive reinforcement to select fragments of the desired behaviour. The idea of training animals by beating them was killed off by experimental work.
I don't know the history of the decline of punishment in education. Perhaps there was real experimental work with children, perhaps not. I find it hard to care; given the animal work, the idea that beating works to encourage learning by children now lacks even minimal credibility.