Phone no longer recognizes whether auxiliary cord is unplugged

I've had this phone for over 6 years, and have a preference for playing things over an auxiliary cable rather than Bluetooth if I can help it. In doing so, I seem to have worn out an important part of the socket. All other audio plays perfectly over its own speakers, but any music, notification sounds, or sounds from a game, it tries to send the audio to the device that it thinks it's connected to.

Is there a way to fix this? Does anyone have a line on where I can get a headphone jack for this phone?

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0

crwdns2942205:01crwdne2942205:0:

A fella I know in the repair industry told me that the Moto Z4 doesn't have a separate charging board, and that the jack and charging port are integrated into the motherboard. The same video you linked confirms it at 3:03. Worse yet, the headphone jack isn't just soldered to the board, but built into the board itself.

crwdns2934271:0crwdnd2934271:0crwdne2934271:0

crwdns2934285:0crwdne2934285:0