A man reported,

I was riding behind the Prophet ﷺ when his mount stumbled, so I said, "May Satan perish."He said, "Do not say, 'May Satan perish,' for when you say that, he swells up until he becomes as large as a house and says, 'By my own power.' Instead, say, 'In the name of Allah,' for when you say that, he shrinks until he becomes as small as a fly."

Azami 11193

Sahih

عن رجل قال

كنت رديف النبي ﷺ فعثرت دابته فقلت: تعس الشيطان. فقال: لا تقل تعس الشيطان؛ فإنك إذا قلت ذلك تعاظم حتى يكون مثل البيت ويقول: بقوتي ولكن قل: بسم الله؛ فإنك إذا قلت ذلك تصاغر حتى يكون مثل الذباب.

الأعظمي 11193صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Supplications, remembrances, and prayer upon the chosen Prophet ﷺ
Chapter
Supplications for riding and travel
Section
What to say when one's mount stumbles
Numbering
Jami al-Kamil 11193 (2nd edition)
Azami 11193