CPU and battery temperature (according to some apps) climb up to high temperatures in no time. Whole phone is super hot and laggy few minutes after starting it up.
It has probably something to do with jack and audio. When I try to play sounds from speaker, the phone just lags and start to heat up even more and is unusable. When I connect headphones, the audio plays but the phone start doing weird things like randomly going to silent mode and works only left headphone. It started randomly one day without any prior problems (expect the fact that sometimes my headphones put my phone on silent mode and the buttons for pause and play on them stopped working).
Its not software related because I did factory reset, uninstalled everything, disabled wifi and phone services and even installed new OS and the problem is the same every time.
I have Nexus 5X. Its 5 years old, but its still in great shape (or it was before the incident) so I would like to fix it rather than buying new phone.