Systems and methods for optimizing looping parameters and looping trajectories in the formation of wire loops