This is not an idiom. Its meaning is made up directly of the elements it is made of. But the construction and vocabulary may have confused things.
'like the shit you are' <- 'like the shit that you are'
A certain event may happen, namely flushing down the pan... (a pan is not usually used for flushing, that is the one thing I don't get about this sentence. A toilet is what one usually what one flushes things down.)
So this event, the flushing may happen. How does it happen? It happens like something else, that is like flushing. Often one flushes shit. 'Like' here is the preposition that is for metaphors/similes. They are saying that you are like shit, or really that you are shit, and comparing the flushing of you to this shit, which you are.
Putting the 'that you are' at the end doesn't really add much meaning, it just lengthens the insult and puts the emphasis interestingly. To give a different example with the same syntax but different vocabulary:
That woman acts confidently, like the politician that she is.
Same structure, different nouns/adjectives.