rake someone over the coals vs teach someone a lesson

rake someone over the coals

verb
  • To berate someone at length, usually from a position of authority or moral authority. 

teach someone a lesson

verb
  • To punish someone. 

How often have the words rake someone over the coals and teach someone a lesson occurred in a corpus of books? (source: Google Ngram Viewer )