As the OP mentioned, many countries, including democratic ones, do have laws around hate speech. Wikipedia has a few words about it in English: https://en.wikipedia.org/wiki/Hate_speech_laws_in_France#The...
You also have laws against defamation that consider it illegal to defame people based on race and other criteria (since the 19th century in France).