Companies shouldn't put themselves in this position: they should simply refuse to have a local presence or local employees in authoritarian-leaning countries.
There is a law in Russia (going into effect next year) that large IT companies must have local presence, otherwise they will be banned from operating in the country. I believe this is inspired by a similar law in China.