The story
It has been suggested to derive from the meaning of the phrase "up the yin-yang", where "yin-yang", a reference to a circular Taoist symbol, is used euphemistically for the human anus; the suggestion, therefore, is that one has so much of some thing that some of that thing is to be found in one's colon, or otherwise beyond one's anus. The meaning of "up the yin-yang", then, is actually "to an excessive degree".
Etymology from Wiktionary, CC BY-SA 4.0.