The connotative value here is that the thing in question has died or, as you on the other side of the pond might say, "gone tits up".
That's not exactly obvious in a literal sense from the saying; though may or may not be apparent from individual context. Even from your dissection of the term my first assumption would be that the thing or person had done "something very embarrassing, but that has happened to almost every one of us"...
mnem
Etymology is not "the study of insects".
The proper etymology is that it has 'shit the bed' because it has died, its sphincter muscles have relaxed and the natural has followed. But I was arriving at it from the point of view of a listener who'd never heard it before and had to second guess the meaning from the innate notion implied in the words of "it failed to perform properly and messed up" and with a little bit of context, say "the piston rod shit the bed", and you arrive at the correct meaning from the wrong reasoning. It's not right, but it's enough to understand what someone meant. I'd gleaned the meaning of the phrase well before I knew the proper derivation.
I've always taken the phrase to imply that the item in question didn't simply die, but that it made an unpleasant mess of other things in doing do.
Yes, word-weirdos like you and me know these things... but they are NOT obvious to the casual observer, which as we both know, is the best that most who claim to speak the English language can claim to be.
Living language, etc can be a total PITA sometimes...
mnem
Or as Steve Allen used to refer to it... the "growing dumbth of the average citizen"...