Final damage is not calculated there tho, only the skill factor. It seems very likely that +lightning damage equips are affecting the skill factor, but just not 100% clear exactly how it affects it (is it 1:1 scale? linear? logarithmic? etc).
If I were to guess, I would say it’s a pretty simple 1:1 scale, meaning +1 lightning damage = +1% skill factor. The reasoning for that is because “GetSumOfItemStats()” is a pretty generic name, probably used by different pieces of code that do different stuff unrelated to Lightning Hands. If the function’s name was something like “GetSumOfItemStatsForLightningHands()” for example, or if it received other parameters than just the attack type, I would assume there was a hidden formula behind it as well (i.e. divide final sum by constant).
Just a guess, tho.