The list of ways to be doomed involves being handed a baby who's just soiled themselves.
The list of gross things in "Just Disgusting" involves farting the alphabet and soiling oneself trying to fart the alphabet.
"Two Brown Blobs" is about a younger Andy pooping in the bath.
Angela Nicely: When the girls are spying on Mr. Monk in “Neighbourhood Watch!”, Maisie writes, “Ware’s he gone now? To toilet?”.
Artemis Fowl: any scene involving Mulch Diggums since his method of tunneling invites these sorts of jokes, and his other bodily function as well.
In Derek Robinson's novel of the Battle of Britain, we first learn why Air Commodore Bletchley is nick-named "Baggy". Then his death is described in excruciating detail - he becomes trapped in a portable chemical toilet when the air-raid siren goes. Deciding to cross his fingers and sit it out - well, squat it out - he chooses wrongly and the whole lavatory is seen bowling across the airstrip, propelled by a hail of cannon and machine-gun fire from a strafing German plane.
In The BFG, where the titular Big Friendly Giant explains how he hates human soda, which has rising bubbles, thus causing the drinker to burp. Burping is phenomenally rude to giants, so instead they drink frobscottle, which has bubbles that sink, thus causing the drinker to... well... whizzpopper!
The film takes this and runs with it: near the end BFG is heaving breakfast with the Queen, and as a gesture of politeness, he pours a round of frobscottle for her, her generals, her staff, her dogs... Cue the Oh, Crap! look on everyone's face just before the room erupts in green-tinted explosions.
Found in The Bible. Yes, the holy one (but only in certain translations - the original Hebrew is somewhat euphemistic, and no one wants to make a poop joke in the middle of one of God's awesome feats). In 1 Kings 18, Elijah goes up against the prophets of Baal to determine whose God is true. When Baal fails to answer, Elijah begins taunting the other prophets, suggesting that perhaps Baal is simply busy, turned aside to do his business on the side of the road, and if they'll just shout a little louder, perhaps he'll answer them (naturally, he doesn't).
Lampshaded in A Brother's Price: Two people talk, in a tasteful and inoffensive way, about the building of indoor privies and the technology involved, as it is relatively new. It is mentioned that one of the participants enjoys the "innocent rudeness" of this conversation.
The Canterbury Tales mixes in several tales of bawdy, scatalogical humor amongst more devout tales, for example with "The Miller's Tale", which involves a gag where a man farts directly into another man's face.
Dav Pilkey's Captain Underpants books have large amounts of it, which is most often evident from their titles alone, although they also balance it with a healthy dose of social satire.
In Charlie and the Great Glass Elevator, in response to the grandparents taking too much Wonka-Vite, the Oompa-Loompas perform a song telling the sad tale of a little girl who foolishly helped herself to the tastiest-looking stuff in her grandma's medicine cabinet — which turned out to be chocolate-flavored laxatives... It takes up several pages. There's also a bedwetting joke.
In "The Long Haul", Greg and his pig both have a Potty Emergency which leads to the pig peeing in Manny's potty. This is also conversed when Greg's teachers disapprove of a series of books called Underpants Bandits because they have too much "rude humor".
In the first book, Fregley chases Greg with a booger on his finger.
In "The Third Wheel", Greg mentions that sometimes he has to wait until all of Manny's Imaginary Friend's are done in the bathroom.
The Dinosaur Vs book "Dinosaur vs. the Potty" is full of jokes about Dinosaur needing to pee.
Dirty Bertie is full of this, because the main character has dirty preferences.
Disgusting McGrossface is mostly just a long list of disgusting traits of a creature, from licking mud off his feet to having a mushroom growing on his butt.
The Divine Comedy, particularly in Inferno, has several passages which indulge in discussion of wallowing in feces, staring at one's own gluteus, and the like. Perhaps most famous is the ending line of Canto XXIII, frequently translated as "And he made a trumpet of his ass."
In Doctor Dog, the grandfather farts the roof off the house and in its sequel, the oldest son steps in poo.
The Enchanted Files: Discussed briefly in Diary of a Mad Brownie / Cursed — goblins, in this setting, "think farts are the most hilarious things in the world".
Many parts of Everyone Poops are humorous, such as "Which end is the snake's behind?" and "A one-hump camel makes a one-hump poop and a two-hump camel makes a two-hump poop— only kidding."
The kids' book Excuse Me is about a Funny Animal sheep named Martha May who holds in her farts because she "doesn't make rude noises", resulting in her getting so much gas she floats up into the air.
One kids' book called Farley Farts is about a frog who farts a lot.
Father Christmas Needs a Wee is about Santa Claus having a Potty Emergency and its sequel Father Christmas Comes Up Trumps is about him trying not to fart.
This conversation from the FUDGE book "Double Fudge".
Fudge: "Richie Potter likes broccoli."
Peter: "We know."
Fudge: "It makes his pee smell funny."
Mrs Hatcher: "Fudge, we don't talk about what we do in the bathroom at mealtimes."
Fudge: "Why not?"
Peter: "Anyway, it's asparagus that makes pee smell funny, not broccoli."
Mr Hatcher: (warning voice) "Peter..."
Fudge: "Broccoli too, I know because he let me smell it."
Mr Hatcher: "That's enough, boys."
Peter: "Fudge's new friend brags about everything."
Fudge: "He even brags about his poops."
Peter: "I'm not surprised."
Fudge: "But Pete, if you saw what he made, you'd understand. It was thiiiiis long." (holds out his hands)
Mrs Hatcher: "That's it!"
In the autobiographical book, Further Adventures of a Grumpy Old Rock Star by Rick Wakeman of Yes fame, he recounts an anecdote from one of his solo tours in which he and his touring band had been incredibly gassy and amused themselves with their constant farting. Their bus driver apparently didn't think it was as funny as they did and kicked them off after a particularly long one by bassist Lee Pomeroy.
Gangsta Granny has the granny's farts as a running joke and the granny and her grandson Ben climbing up a sewer pipe.
In the Sundered Lands novel Fire Over Swallowhaven, the heroes finally find the phoenix they've been searching for and slowly approach it while hearing rumbling noises. When they get close to the giant beast, they discover that the phoenix is sleeping and repeatedly passing gas in the slumber.
The 16th century novel Gargantua has the protagonist discuss one whole chapter what's the best material to wipe one's ass.
Rabelais loved this trope.
The children's book The Giant's Loo Roll is about a large toilet roll belonging to a giant rolling down the hill and people using it. There's also a joke about the townspeople having to pee.
Goblins in the Castle: Goblins think farts are hilarious, as evidenced when one pulls his nose and lets out a massive fart, then he and the other two goblins with him proceed to laugh hysterically.
The children's book Good Families Don't is about an anthropomorphised fart who makes the adults go unconscious.
Both used and deconstructed in Mary Roach's Gulp, which discusses the human digestive process from spit to... poo.
I Have to Go is about a boy named Andrew who has to pee in inconvenient moments.
Horrible Histories sometimes made jokes about poop and pee if it was relevant to some gross historical fact.
Horrible Science: In "Shocking Electricity", they joke about making electricity from methane (which is associated with farts) and the narrator says, "By now you're probably bursting to ask a question, although I don't know for sure, you might be bursting for a pee."
Household Gods: Nicole experiences culture shock in the ladies' room at the bathhouse, where the toilet seats are completely unpartitioned, and all the women and girls relieve themselves in full view of everybody else.
Journey to Chaos: According to Kallen, Nunnal Enaz could alter someone's genetic code to make them pee lemon juice and find it hilarious.
At one point, Oscar sits between his father's legs and says, "Pretend I'm the poop and you're pooping me out."
Oscar farts in the bath once and asks, "What's that horrible smell? Maybe it was those bubbles."
Letters Back to Ancient China, since Kao-tai (the narrator/protagonist, a time-travelling mandarin from medieval China) doesn't know how modern German toilets work and didn't want to ask. But it's still done in as good taste as possible.
In London, a much-abused construction worker lures his Jerkass foreman beneath the shaft of a half-built garderobe and then defecates down the shaft. He'd also prepared for this event by eating a huge meal some hours beforehand...
In “Roys Bedoys & the Three Little Pigs”, Roys, playing the Big Bad Wolf, threatens to fart in the second pig (played by Truly)’s house.
In “Stop Bragging, Roys Bedoys!”, the Bedoys brothers tease each other with “Roys has stinky farts” and “Loys has stinky diapers”.
In “We’re Moving, Roys Bedoys!”, Roys tells his friends that he’s so close to them, he can fart around them and not be embarrassed.
In “Stay at Home, Roys Bedoys!”, Maker farts.
In “Y is Not for Why, Roys Bedoys!”, Wen, while demonstrating yoga, says, “Don’t stretch too far or you’ll fart.” ** In “Roys Bedoys’s Spectacular Halloween Party!”, one of the clues for the scavenger hunt is something that’s white, can only be used once, and has to do with poop. It turns out to be toilet paper.
In “Meet the Baby, Roys Bedoys!”, when Mrs. Bedoys is pregnant, Roys wants to name the baby Toyler if it’s a boy. Loys rejects the idea because it “sounds like toilet”.
In “Be Patient with Your Little Brother, Roys Bedoys!”, Loys thinks the pyramid Roys built in his video game looks like poop.
In “Stop Wasting Water, Roys Bedoys!”, Roys’s first idea for saving water is not flushing after peeing.
In “Bring a Sweater, Roys Bedoys!”, Roys poops despite not needing to, so he can eat more (biologically inaccurate, since poop is stored in the lower intestine, not the stomach, but he might not know any better since he’s only about five).
In “Stop Making Excuses, Roys Bedoys!”, when Roys wants to be reminded for various things, Loys says, “Do you want me to remind you to go potty?”.
The School for Good and Evil features a scene where Agatha is crowded by haughty princesses who demand to see proof that she belongs in the school for good. Since she doesn't have any, she does the first thing that comes to mind: she farts, thereby causing them to panic and run away. Later on, one of the complaints leveled at her is that she "farted in our face!"
In the picture book Seagull Sid and the Naughty Things His Seagulls Did, the seagulls (save one named Freda) splat the picknickers with poop because they want the beach to themselves. One even poops in a drink.
In The Stormlight Archive, Shallan interrupts Prince Adolin's formulaic story of his battlefield exploits by asking him how he poops in heavy armour. Once his bewilderment subsides, he admits that they're having a pretty interesting first date.
"So yes, I, Adolin Kholin — cousin to the king, heir to the Kholin princedom — have shat myself in my Shardplate. Three times, all on purpose. You are a very strange woman."
In The Top Secret Undercover Notes Of Buttons Mc Ginty, Buttons notes that the cage room on the ship smells like animal dung and when he and Silky hear a strange noise, they think it might be "the ship farting" or someone having a "bad toilet experience".
Treehouse: In one of the books, a setting for the humor level is "pants-wettingly funny".
Uncle John's Bathroom Reader zig-zags this. One page will have a fart joke, the next will have a scientific article on why we pass gas, and the third will have an article about something crazy like a gold-plated toilet.
Turns up sometimes in Welkin Weasels, most notably in the bit where Scirf escapes the tower by climbing down the garderobe (toilet which drains into the lake).
Sylver: But why didn't you call out to us? Scirf: Couldn't. Had my mouth full. :: Sylver chose not to delve any further into this line of enquiry.
In Why Is Snot Green?, pretty obvious due to the title, but suprisingly averted for the majority of the book.
The World of Poo, Young Sam Vimes's favourite book in the Discworld novel Snuff mixes a lot of this with interesting facts about the historic removal of waste and the function of the digestive system. As Old Sam says, the author has an instinct for what makes a six-year-old boy laugh until he's sick.
The in-universe author, Felicity Beedle, appears in Snuff, in which it's mentioned she's also written books about wee wee, snot, nose-picking, pimples, and a boy's (unspecified) "enormous problem".
Toilet humor is far from the most prevalent type of humor in Discworld but it does pop up from time to time even when Young Sam isn't involved. Harry King tends to bring it, as he's a waste-management businessman (Taking the piss since 1961!) Also, in The Wee Free Men, Tiffany's little brother is confused about what "wee" actually means and keeps calling the Feegles "weewee men."