I think that it's a parallel development. It's unlikely to be a borrowing from some PIE descendant because
Proto-Germanic shifted PIE *k into *h (Grimm's Law), so the word would end as *hahha. Plus a direct descendant of the word isn't even attested in Germanic languages [see note].
Proto-Balto-Slavic and its descendants show a single consonant in that word, as PBS *kākā́ˀtei (see Latvian kakāt, Russian какать/kakat'). The result would be *kaka or *kakaa. (A double consonant often becomes single, but the opposite is rarely true.)
*NOTE: before someone mentions German "kacken", it's likely a borrowing from Latin "cacō" I shit. Now that's some borrowed shit!
And for some reason, "kakka" is de facto word for excrement in Finnish, which is from the Uralic family.
It is very weird seeing it here, because it's like THE word.
kakka is more like "poop" and the rougher word "shit" has a different word (paska[Learning about the homophone-y Pascal is always a knee-slapper])
I think that it's a parallel development. It's unlikely to be a borrowing from some PIE descendant because
*NOTE: before someone mentions German "kacken", it's likely a borrowing from Latin "cacō" I shit. Now that's some borrowed shit!