The Importance of Goodhart's Law
Andrew Grove (of Intel fame) wrote a book, High Output Management, suggesting that management needs two opposing metrics to avoid this problem. For example, measure productivity and number of defects, and score people on the combined results.
BTW the large nail/little nail joke has a third part. Soviet management eventually got a clue and started measuring by the value of the nails produced... and the result was the world's first solid-gold-nail factory.