I actually got to experience a pill somewhat like that one several years ago. Not for farts, but to try to locate an ulcer that had me hospitalized for several days. I lost a fair amount of blood and got several units of blood, and once I was strong enough, they did both a colonoscopy and an endoscopy (examining my digestive tract from both ends.) That didn't find anything, so they proposed a "camera endoscopy" which would send a tiny pill-sized camera (with transmitter) down my gullet to photograph the section that the previous -oscopies couldn't reach. Before swallowing the pill camera, they attached to me a receiver with a view screen, so I could watch the scene as the camera wandered downward.
I was told that the camera-pill would emerge in a day or two, so for several days I pooped into a strainer hoping to catch the camera as a souvenir.
Yes, I would have washed it before placing it on view on my mantle shelf.
But, alas, I somehow missed it, so I have no souvenir.
P.S. It didn't find anything anyway, so my ulcer seemed to have healed itself with no help. But it was an interesting experience.