I think it might be easier to just do it with lua. use Script.SetWatchWeapon and addon.ProjectileDestroyed to detect when the projectile hits something, then use Spring.GetUnitNearestEnemy and Spring.GetUnitPosition to find if and where to chain to, then rinse and repeat.
This also get around the problem of the lighning chaining between 2 targets constantly, but has the problem of having the drawn the lighting effect, which might be problematic.
of course, theres plenty of spots in this where it could screw up and turn the chaining weapon into a cheeseburger with ham.