Origin of the term Hum-Bug?

Does anyone know the origin of the term Hum-Bug as in: “Ah Hum-Bug” used in movies like “The Wizard of OZ”? I know the dictionary definition but I am really wondering how it cam to be. It sounds romotely German but it was very common in American lexicon during the 30’s and 40’s.

hum·bug (hmbg)
n.

  1. Something intended to deceive; a hoax or fraud.
  2. A person who claims to be other than what he or she is; an impostor. See Synonyms at impostor.
  3. Nonsense; rubbish.
  4. Pretense; deception.

My WAG is from Dicken’s and his wonderful bad guy, Ebenezer Scrooge.

Although my dictionary admits that the origin is uncertain, it does date the term to the 18th Century; a little before Dickins’ time.

The Word Detective mentions that a now obsolete word “humdudgeon” first used in 1785 was a combination of humbug and dudgeon.

dudgeon noun
Extreme displeasure caused by an insult or slight

I don’t know if this enters into it, but in England, “humbugs” are also a kind of hard candy. Maybe the word became synonymous with “deceptive” because the candy looked very nice but tasted really awful.

“Crikey! I thought Father Christmas brought me treats, but it’s just blah humbugs!”