The most quoted source of the phrase "a load of codswallop" is that of the Englishman Hiram Codd; who, in the 1870s perfected the bottling of lemonade. He inserted a glass marble into the bottle and when shaken, the pressure of the fizzy pop forced the marble against the neck to form a tight seal. Naturally, the invention was called the “Codd Bottle”.

The Cockney rhyming slang for mild ale, the beer drunk in the UK, is "wallop the child" i.e. “mild”. Thus, in the early to mid-20th century, “wallop” became slang for beer, and beer drinkers would certainly sneer at Hiram Codd’s bottled lemonade.

Eric Partridge’s “A Dictionary of Slang” traces the use of “wallop” for beer to servicemen in 1930s. An early example of its use is found in J.B. Priestley's book “Three Men in New Suits” (1945): "It's drink ... booze or wallop ... (that cause you) nine times out of ten ... (to) wake up in the morning ... with the usual hangover."

A 1959 episode of the UK television series “Hancock's Half Hour” surmised on the link between “wallop” (beer), the inventor Hiram Codd, and “a load of codswallop”:

“… the term “wallop” … wasn't associated with … beer until well after Codd's death, (making) the 'codd's wallop' derivation to booze highly improbable.”

“Cod” is little-used ye olde English slang meaning “to hoax or take a rise out of codd bottles (a joke, a leg-pull, a parody, a trick or some other kind of insincerity) known since the 1870s. Its use was similar to that of the verb “to kid”, as in this 1884 quotation from northern English: "Tha'st only coddin me as tha allus does; tha'l none tay me to see th' fair." (You are kidding me as you usually do. You do not convince me of its truth.)

The most likely explanation is that “a load of codswallop” is a made-up bit of nonsense that sounds right for its meaning. Perhaps Bob Dylan said it best: “The answer my friend is blowin' in the wind, the answer is blowin' in the wind."