obviously the jack is loose on the ipod.
it sounds like the pin inside of the jack has worn or become bent.
but the soldered joint might have come loose.
usually a severe angle is a bent pin inside the jack.
and
if you only have to wiggle the jack a little bit, the soldered connection broke loose.
either one.. its going to require a new jack.
i've seen that they sell the jack on a little circuit board with a very thin/flat ribbon.
its an assembled set.
i checked ebay.. and the headphone jack for the ipod touch is different than the other ipod i looked for.
the jack comes pre-soldered onto a circuit board with a ribbon cable.
the other one had some other circuitry on the board.
the problem with the jack, its soldered ON the board.. not THROUGH the board.
anyways..
the jacks are less than $10
and that might be cheaper/easier than drilling a hole through the circuit board to try and re-solder the joint.
because then, you might not know which spot to drill.. and you might not get a good connection with the circuit trace.
AND
the solder you use might have a resistance that is too high, compared to the original solder used.
if you are not scared to take the ipod apart.. it should cost about $10 to fix.
just remember, when you unscrew everything.. pull it apart SLOW and EASY.
you never know what kind of cords are really short and require disconnection before the two pieces can be fully seperated.