This is good to know for London specifically.
It's not as satisfying as yours but my general technique that works everywhere in the world where cabs are competing is: ask them if they take credit cards and their reader is working before you get into the cab. If they say no you find another cab. (In my experience they never say no anyway. But I learned to do this every single time I use a cab anywhere because this scam is so unbelievably common everywhere in the world.)