Mine has done this too..
And in case people are curious there is not much fixable inside.
I tore my player apart and cleaned it carefully with 99% alcohol *carefully with cue-tips
put it back together but the problem still persists.
The outer plastic casing is clipped into place with no screws so i used a tool for cell phones for prying glass off cell phones
and a plastic guitar pick.. either will work if thin enough to jam into the spot.
Look around the outer edge and you will see where it connects and i think.. even a finger nail might start prying it apart LOL
So it clips back into place after words so it won't be broken if you pry it apart.
be careful though there is a ribbon connecting both sides !
Once you look inside though you will see a super small headphone jack that is too small to deal with really.
And if you wanted to resolder on a new one you would need to get a proper replacement (good luck with that)
Then the hard part woudl be taking it apart to get at the solder points which would require taking it apart a lot more (not a easy idea)
What i think the problem is the metal connectors inside the jack get loose and worn out over time and don't get a tight grip anymore.
Think of it as holding a Spoon in your hand but so loose it keeps slipping out of your fingers..
My goal from the start was to find a way to bend the metal inside to refresh the grip on the phones plug.
I could not find any way to get at inside the female plug ..it's just so damn small

I have worked on a lot of micro computer solder jobs so i was comfortable doing it..
for example i have recapped a lot of mother boards and power supplies that have worked fine to this day and that is super mega ultra small soldering !
Not much you can do i think but keep both connection points clean and avoid and excessive wear and tear if you can.
i had thought about trying to flatten out my headphone's pug so it was long and oval instead of long and round.
but i thought if it had a gold plating then i may just crack the coating and make a nasty messy LOL
i dunno i have lots of heaphones i should just try it..