I think what you are thinking of is an artificial sphincter or nerve stimulator implant. The artificial sphincter works reasonably well for urinary incontinence, but not so much for fecal incontinence.
http://gastro.oxfordjournals.o...4/gastro.gou003.full
Jan