2,024. When a Man Isn't Liable
Hilchos Issurei Biah 1:11
There is no liability if a man engages in prohibited relations without an erection. If his organ was hanging limply like a dead man’s, such as if he was sick or had a congenital disorder. Even if he inserts his organ manually, he is not liable for excision or lashes, and certainly not for execution because this isn’t considered intimacy. It does, however, disqualify a woman from eating trumah and the court administers stripes for acting rebelliously to both participants.
Hilchos Issurei Biah 1:12
If a man just happens to be sexually intimate with one of the prohibited relationships even though he didn’t intend to do so, he is still liable. The same applies to one who’s intimate with women prohibited by a negative commandment or with one of the secondary relations. If a man is intimate with one of the prohibited relationships after she has died, he’s not liable at all; it goes without saying that this is the case with women who are prohibited by a negative commandment alone. However, if one is intimate with a person or an animal that is soon to die, he is liable because it’s alive now even though it will ultimately die. Even if the two signs that validate ritual slaughter were slit, if the person or animal is making its final movements, if one is intimate, he is liable until she or it dies or is decapitated.