Probably not the answer you're looking for but possibly still relevant/interesting.
If we can believe Wiktionary, it says:
Emphatic form of holy crap.
Going with that...
Using
holy
as an expletive was answered hereanswered here.The word
crap
according to dictionary.com:
Sense of "rubbish, nonsense" also first recorded 1898
- And finally,
cracker
is quite an old English word (1400s?).
So I'd suspect sometime in the early 1900s, as crap
started to pick up momentum as the new shi*, one or more creative souls shouted it in excitement and it thereafter spread. ;)