They have the same etymological root, from a Proto-Germanic word for a lump, which is the tooth (cog) on a cogwheel, or the round bulky lump of a cog ship.
So they're cognates.
Cog mates, even
But "cognate" is not.
Nice
Godammit
No... Cog, damnit.