Dynamics of Fermat potentials in nonperturbative gravitational lensing