Selective enforcement is one of those concepts that isn’t talked about much outside of legal ethics circles unfortunately, but I think it’s an important concept to be aware of and the potential issues with it. I first heard about it from The Dictators Handbook, which explores many behaviours of politicians and those in power, including how and why corrupt nations often employ selective enforcement. It’s an interesting read, would recommend. It definitely changed how I looked at the world.
This is basically rule number one in the autocrat’s handbook: Rule something as illegal but make it necessary (e.g. give your public servants a near-zero salary, making them dependent on taking bribes to live). Then at any point the leaders have the legal grounds to arrest whoever they want for ‘corruption’. It’s a very common tactic.