The correct option is B An object lesson
An idiom is a group of words that, together, have a meaning different from the literal meaning of those words, for example 'foot in your mouth' which does not literally mean someone's foot in your mouth, but it means saying or doing something embarrassing. The phrase in the given sentence 'an abstract lesson' literally refers to a lesson that is abstract in nature, and does not have any different meaning. It's not an idiom, hence it needs to be changed, and option A is incorrect. 'An object lesson' is an idiom, it means 'a striking practical example of something'. Here it refers to the 'harsh punishment' that was given to a person, that acts as an example for all criminals, so that they learn a lesson and don't commit crimes, or else they'd be punished harshly too. Hence option B is correct. In 'an abstruse lesson', 'abstruse' means 'difficult to understand'. The phrase literally means 'a lesson that is difficult to understand', it's not an idiom and will not be used here. Also, the meaning is not relevant hence, option C is incorrect. 'Acute' means 'of a severe or intense degree', the phrase 'an acute lesson' means 'a lesson of a severe degree'. It has a literal meaning, it's not an idiom,whereas we require an idiomatic expression, hence option D is incorrect.