Heck is a euphemism for hell. It was first used in the late 1800s. It was never associated with fuck.
The only time heck and fuck will be mixed is when I say, “Why the fuckin’ heck would you believe this?”
The leading theory is that it derived from the Scottish word “hech” which meant “surprise or shock.” Like if a sheep bites you.
“Oh hech! That hurt, ya bloody sheep. I just wanted to cuddle!”