How did the word jail get the nickname "pokey"?

Very likely.

Many dictionaries use the spelling “hoosegow”, which is weird. That seems to be a British spelling, but the word is definitely an Americanism.

Maybe related to “porridge” as a slang term for imprisonment? Or the crank handle hard labour prisoners had to turn so many times a day?

“23 years later”

I mean, good grief!

That’s what I would have guessed too, but according to Eric Partridge it may be the other way around. Re: stir

An abbreviation of Romany stardo, ‘imprisoned’, ot more likely staripen, loosely stariben or sturiben, a prison.

(A Dictionary of Underworld Slang.)

In The Concise Dictionary Of Slang he says of porridge

Perhaps suggested, in part at least, by the semantics of S.E. stir, by a pun on stir, a prison.

And that’s what we have Eric Partridge for.

j