Is sexually stimulating an animal a sin, like having sex with it, as the Torah says, or is it not considered a sin?
There are some professionals that must do this to extract their semen, for example, horse breeders.
Mi Yodeya is a question and answer site for those who base their lives on Jewish law and tradition and anyone interested in learning more. It only takes a minute to sign up.Sign up to join this community
The capital sin of bestiality (all humans with any animal or bird) only applies when there was insertion of the glans/organ, either if the person penetrated the animal or bird (vaginally/anally) or had them insert their organ in the person (vaginally/anally) (Rambam, Yad, Issurei Bi'ah, 1:16).
Physical contact with an animal, of a type that has sexual undertones, is prohibited as an accessory to the sin of bestiality.
Therefore there is no issue of bestiality with normal animal breeders, who bring animals together to mate, since their physical contact with the animals doesn't involve themselves sexually penetrating the animal, nor does their activity have any sexual overtones regarding a human.
The same applies to sexually stimulating an animal in order to extract their semen, for example, horse breeders. In all these cases, the human contact is purely mechanical, and does not involve personal sexual contact with the animal.
There's also a general prohibition of sexually arousing oneself, unless the arousal is in the context of permitted sexual activity.
Animal breeders are generally considered not to be aroused by their activities, since they're focused on their work, and it's not expected to cause them to have sexual thoughts. However if a person were to find themselves being sexually aroused from such activity, then they would be prohibited from being involved with this type of work.
Based on the above, a person who has a sexual fetish with animals, is not allowed to conduct any activity with an animal that gives them sexual gratification. This would be either due to being an accessory to the sin of bestiality, or due to the general prohibition of sexually arousing oneself, not in the context of permitted sexual activity.
The Shulchan Aruch permits this provided it is for the purposes of animal husbandry. As usual, CYLOR for any practical application of this halacha:
אלו שמנאפים ביד ומוציאים שכבת זרע לא די להם שאיסור גדול הוא אלא שהעושה זה בנדוי הוא יושב ועליהם נאמר ידיכם דמים מלאו וכאלו הרג הנפש: Those who 'commit adultery' with their hand and thereby cause semen to be spilled it is not enough that this is a great prohibition, but one who does so should sit in excommunication and about them it is said "Their hands are full of blood" and it is as if they have killed a person.
אסור לאדם שיקשה עצמו לדעת או יביא עצמו לידי הרהור אלא אם יבא לו הרהור יסיע לבו מדברי הבאי לדברי תורה שהיא אילת אהבים ויעלת חן לפיכך אסור לאדם לישן על ערפו ופניו למעלה עד שיטה מעט כדי שלא יבא לידי קישוי ולא יסתכל בבהמה וחיה ועוף בשעה שמזדקקין זכר לנקבה ומותר למרביעי בהמה להכניס כמכחול בשפופרת מפני שהם עסוקים במלאכתם לא יבואו לידי הרהור:
It is forbidden for a man intentionally make himself have an erection or to cause himself to think about sex. Rather if he thinks about sex he should remove himself from vain things and go to the words of Torah which is like a beloved doe and a graceful deer. Therefore it is forbidden for someone to sleep on their back with his face up, rather he should lean to the side so that he doesn't come to have an erection. And he shouldn't look at a beast or a wild animal or bird when the male and females are copulating.
But it is permitted for animal breeders to 'put the applicator in the tube', because they're busy with their work, and it won't cause them to have sexual thoughts. (Bolding mine)