Even if one accepts that death is inevitable, farting can still present a serious hazard. In medieval times, some believed that the soul left the body by the anus. In the 14th century farce, Le Muynier, this acutely important moment goes desperately wrong for a poor miller.
[The miller] warns the priest to absolve him from his sins, saying: “My stomach is in control of me. Alas! I don’t know what to do; turn around.”
The priest answers: “Ha! Saving your grace!”
Then the miller remarks: “Turn around! I’m going to shit myself!”
The wife and the priest pull the sick man to the edge of the bed and place him in such a position that if the doctrine of soul-departure by the anus be true, they may witness the miller’s final performance. The phenomenon of rectal flatulence is now observed, when suddenly, to the consternation of the wife and priest, a demon appears and placing a sack over the dying miller’s anus, catches the rectal gas and flies off in sulphurous vapour.
(John G. Bourke – Scatalogic Rites of All Nations 1891)