I have to say, I loathe this expression. I think is just a cleaned up version (for the likes of CBBC) of "pile of excrement" (you all know what I mean!!).
The knickers/pants connection - always a worthwhile conjunction! - would seem to be as you suggest, Fred. Click http://www.worldwidewords.org/topicalwords/tw-pan4 .htm
for further information. (My apologies if this appears twice...my first attempt at posting disappeared into the ether.)