Here's why it's likely a modern, lighthearted expression:
* "Heck" as a substitute for "hell": The use of "heck" is a common way to soften the word "hell" in casual language.
* "Pup" as a childish term for a dog: It adds a playful, almost comical element to the phrase, emphasizing its extreme hyperbole.
The phrase is used to imply something that happened a very, very long time ago, often to emphasize the length of a period or the age of something. It's not a phrase you'd find in serious historical or literary contexts, but rather a playful exaggeration used in casual conversation or humor.