The word "hogwash" itself comes from a more honorable venue, the barnyard. "Hogwash" in the farming sense is garbage, kitchen waste, or sometimes the leftover refuse of a brewery, used as slop or swill for the feeding of swine. The "wash" in "hogwash" is derived from the noun "wash," which has many senses, including "waste water, discharged after use in washing" (as in rinsing out a pot, for instance), and "hogwash" in the literal feed-the-piggies sense is indeed often largely liquid. "Hogwash" first appeared in English in the barnyard sense around 1440, and by 1712 was being used as a synonym for cheap liquor or any other worthless thing, including bad writing. By the late 1800s, "hogwash" was being used among journalists themselves to describe worthless writing in newspapers, and ever since "hogwash" has been used to mean any sort of intellectually fraudulent argument or specious proclamation.
I mentioned above that "swill" is another word for "hogwash" in the pig-food sense, but "swill" (which comes from the Old English word "swillan," meaning "to rinse out") is not generally used to mean "nonsense." "Swill," rather, has been used since the 16th century to mean food which is fit only for swine.