Shaykh Muḥammad Ṣāliḥ al-ʿUthaymīn:

Those who make takfīr they are the inheritors of the Khawārij, those who rebelled against ʿAlī bin Abi Ṭālib . The kāfir is the one whom Allah and His Messenger ﷺ have declared a kāfir, and takfīr itself has conditions, amongst them is knowledge and intent. So we ought to know that this ruler opposed the truth, and he knew the truth, and he intended deliberate opposition, and that he did not have any faulty interpretation (in the matter), such as when a person prostrates to an idol, and he knows that prostrating to an idol is shirk and he does not have any faulty understanding either.

What is important is that this affair has conditions, and it is not permissible to rush into takfīr, just as it is not permissible to rush into the saying, “This is lawful and this is unlawful.”