I have already seen some ATMs that shuffle the numbers on the numberpad around for each PIN entry. It is inconvenient for muscle memory, but prevents this kind of attack.
I know somebody working at a bank talking about their implementation, and how many elderly customers block their cards after wrongly entering their pin.