Messenger of Allah ﷺ said, "Keeping horses may be a source of reward to some (man), a shelter to another (i.e. means of earning one's living), or a burden to a third. He to whom the horse will be a source of reward is the one who keeps it in Allah's Cause (prepare it for holy battles) and ties it by a long rope in a pasture (or a garden). He will get a reward equal to what its long rope allows it to eat in the pasture or the garden, and if that horse breaks its rope and crosses one or two hills, then all its footsteps and its dung will be counted as good deeds for its owner; and if it passes by a river and drinks from it, then that will also be regarded as a good deed for its owner even if he has had no intention of watering it then. Horses are a shelter from poverty to the second person who keeps horses for earning his living so as not to ask others, and at the same time he gives Allah's right (i.e. rakʿat) (from the wealth he earns through using them in trading etc.,) and does not overburden them. He who keeps horses just out of pride and for showing off and as a means of harming the Muslims, his horses will be a source of sins to him." When Messenger of Allah ﷺ was asked about donkeys, he replied, "Nothing particular was revealed to me regarding them except the general unique verse which is applicable to everything: "Whoever does goodness equal to the weight of an atom (or small ant) shall see it (its reward) on the Day of Resurrection." (Using translation from Bukhārī 2371)
أَنَّ رَسُولَ اللهِ ﷺ قَالَ «الْخَيْلُ لِرَجُلٍ أَجْرٌ وَلِرَجُلٍ سِتْرٌ وَعَلَى رَجُلٍ وِزْرٌ فَأَمَّا الَّذِي هِيَ لَهُ أَجْرٌ فَرَجُلٌ رَبَطَهَا فِي سَبِيلِ اللهِ فَأَطَالَ لَهَا بِمَرْجٍ أَوْ رَوْضَةٍ فَمَا أَصَابَتْ فِي طِيَلَهَا ذَلِكَ مِنَ الْمَرْجِ أَوِ الرَّوْضَةِ كَانَ لَهُ حَسَنَاتٌ وَلَوْ أَنَّهَا قَطَعَتْ طِيَلَهَا ذَلِكَ فَاسْتَنَّتْ شَرَفًا أَوْ شَرَفَيْنِ كَانَتْ آثَارُهَا فِي حَدِيثِ الْحَارِثِ وَأَرْوَاثُهَا حَسَنَاتٌ لَهُ وَلَوْ أَنَّهَا مَرَّتْ بِنَهَرٍ فَشَرِبَتْ مِنْهُ وَلَمْ يُرِدْ أَنْ يَسْقِيَ كَانَ ذَلِكَ حَسَنَاتٍ فَهِيَ لَهُ أَجْرٌ وَرَجُلٌ رَبَطَهَا تَغَنِّيًا وَتَعَفُّفًا وَلَمْ يَنْسَ حَقَّ اللهِ فِي رِقَابِهَا وَلَا ظُهُورِهَا فَهِيَ لِذَلِكَ سِتْرٌ وَرَجُلٌ رَبَطَهَا فَخْرًا وَرِيَاءً وَنِوَاءً لِأَهْلِ الْإِسْلَامِ فَهِيَ عَلَى ذَلِكَ وِزْرٌ» وَسُئِلَ النَّبِيُّ ﷺ عَنِ الْحَمِيرِ فَقَالَ لَمْ يَنْزِلْ عَلَيَّ فِيهَا شَيْءٌ إِلَّا هَذِهِ الْآيَةُ الْجَامِعَةُ الْفَاذَّةُ {فَمَنْ يَعْمَلْ مِثْقَالَ ذَرَّةٍ خَيْرًا يَرَهُ وَمَنْ يَعْمَلْ مِثْقَالَ ذَرَّةٍ شَرًّا يَرَهُ} [الزلزلة 8]