All perfect praise be to Allah, the Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
We do not know of the mentioned substance and its nature. However, sorcerers, magicians, and those who deal with the jinn often use treatments with smoke. Scholars warned against obeying them in this regard.
Shaykh Ibn Baaz was asked about the ruling on using incense to drive away devils. He replied, "I do not know of any basis for such an act in the Shariah! It is incumbent not to do it because it is part of the superstitions that have no basis. Rather, devils can be driven away by frequently reciting Thikr (expressions of remembrance of Allah) and Quran and seeking refuge with Allah's perfect Words from the evil of what He created..." [Majmooʻ Fataawa Ibn Baaz]
We have previously underlined some ways to differentiate between sorcerers and Ruqyah-therapists (who treat with Quran recitation) in fatwas 6347, 18831, and 22876 .
Allah knows best.