The scholars of The Oxford English Dictionary fail to give the various myths as to the origin of codswallop house-room. They say the origin is unknown, so unknown it is.
The main urban myth is that a Victorian businessman named Codd either made bad lemonade or a device for sealing lemonade bottles. The latter, supposedly, had to be forcibly pushed or walloped down into the bottle in order to get at the liquid...hence, ‘codswallop'! It's a lovely story, certainly, but almost certainly rubbish!
Actually, 'wallop' as a colloquial name for beer dates back only to the 1930s and there is no evidence that it was ever applied to lemonade. Its connection with liquid at all relates to the onomatopoeic effect, since the word sounds like rapidly boiling water.
One old meaning of ‘cod' was a bag or purse, vulgarly used to mean the scrotum, and thus 'cods' meant 'testicles'. That is a much more likely connection with the idea of nonsense. People may at one time have used cods in much the same way as we today use the b-word for those organs to mean 'nonsense', too.
In fact, 'codswallop' itself is not recorded anywhere prior to the 1960s, as it happens. Had it been around in Victorian times, as often claimed, I cannot imagine Dickens, say, would not have used it in the mouth of one of his London characters.
All-in-all, you can - as usual - safely discount any of the folk etymology sources suggested.