I don't think it has anything to do with programming skill; it's a design decision. It's not the hitbox that's the problem, it's simply that to hit an enemy, your crosshair has to be on the enemy at the time that the blow lands, madmole explained this before a17 was released. When you know this, hitting is actually not hard. I can melee without issues.
I wouldn't mind them making it work via collider so that the entire swing can hit, but since that would also make hitting way more easier, perhaps they'd have to rebalance something.