Does this headphone jack-type component exist?
If you want to avoid damaging stuff, use a short cable with a headphone socket one one and and a plug on the other,  when  you pull long cable the socket will furn to face the cable and it will decouple.

eg: https://www.aliexpress.com/item/short-3.5/32810396861.html