The Messenger of Allah ﷺ said, "Whoever keeps a horse ready for the cause of Allah, out of faith in Allah and trust in His promise, will find that its feeding, its drinking, its urine, and its dung all count as good deeds in his scale on the Day of Resurrection."
حدثنا إبراهيم حدثنا ابن مبارك عن طلحة بن أبي سعيد سمعت سعيدا المقبري يحدث أنه
قال رسول الله ﷺ من احتبس فرسا في سبيل الله إيمانا بالله وتصديقا لموعوده كان شبعه وريه وبوله وروثه حسنات في ميزانه يوم القيامة
Its chain of transmission is sahih. It is found in Bukhari 6/34, in the chapter on jihad, "Whoever keeps a horse ready," and in Nasai 6/225, no. 3582, Book of Horses, chapter on feeding horses, from Abu Hurairah, and in Hakim 2/92, where he graded it sahih and Dhahabi agreed with him.