I’ve come across this term occasionally, and wondered about its origin. It turns up, among other places, in the song “The Fall of Charleston,” in the lines,
With Sherman, Grant and Porter too, to lead our men to glory,
We’ll squash poor Jeff’s confederacy, and then get “Hunkydory!”
Sounds like it means happily drunk.
Well, I finally found a near-contemporary source. New York Commercial Advertiser, August 5, 1870, p. 2:
The boys who use the slang expression “hunky-dory” suppose they are describing something super-excellent. Not so. The word is Scotch, and is a synonym for the Latin non compos. He is “unco dour in the uptak,” is the full expression, and means half-witted.
So it means stupid drunk. Close enough, y’all.
_______________Image from “The Five Stages of Being Drunk in the 1860s.”