It’s a “minced oath”, apparently:
‘Feck is a popular minced oath in Ireland, occupying ground between the ultra-mild expletive flip and the often taboo (but also popular) fuck. It’s strongly associated with Irish speech, and serves a broad range of linguistic purposes that I’ll address briefly in this post.’
It doesn’t derive from the obvious source:
So where does the curse, the not-quite-rude word, come from? It’s commonly assumed to stem from its coarser cousin fuck, the simple vowel change undercutting its power and making it more suitable for public expression. But Julian Walker, an educator at the British Library, offers a more roundabout route: “In faith” becomes the improbable “in faith’s kin” shortened to “i’fackins”, which gradually shrinks to “fac” and “feck”.