All you need to do is clamp your time value, so that it holds a constant value after it's gone through the desired number of iterations.
// Constants to declare elsewhere.
float maxCycles#define =TWOPI 16.0f;28318530718
float twoPi = (3.14159265358979323846f#define *maxCycles 21.0f);
// These lines go inside your mainImage shader.
float phase = (iTime - startTime)/twoPi;TWOPI;
phase = min(phase, maxCycles);
float factor = .5 * sin(twoPiTWOPI * phase);
This effectively stops time after the desired number of cycles of the sine function.
Note that you'll need to provide a startTime so it knows when the pinch began. You can use a float uniform for this and set it once at the beginning of the effect.