It’s not even remotely similar. We’re talking about countries where (almost) everyone is Muslim and Muslims control the political system, police, etc. Moderate Muslims who can’t reasonably be accused of “Islamophobia” understand that political Islam is a danger and often take extreme measures to keep it in check.
Projecting American racial politics onto other countries is an extremely bad (and bizarrely ethnocentric) way to try to understand how the world works.