I Had the same problem with an iPhone X after replacing the charging port, Solved this simply using an original salvaged charging port, 100% fixed. Some aftermarket charging flex cable aren’t working on iOS 13.x, They’re messing with something related to the thermal system, and forcing a kernel panic. (PS=The phone will keep restarting without any charging port,too).
this happens when you put the wrong screw in the bottom right hole of the lcd shield plate. this hole uses a 1.2mm screw, if you put a 1.3mm scew, will damage the ic tracks underneath the screwhole