If you are sure classic and smart invert are turned off it will most likely be a software problem. I would back up the phone and restore with iTunes. It will not be a virus.
I would think that the repair shop you sent it to would have ruled out a faulty screen but this is the first thing you need to rule out. The iPhone XS is a doubled layer board with an interposer board between which consists of pads that allow the voltage and data signals to go from the top board to the bottom board. A common issue on all the X models is that if the phone has ever been dropped it can crack the solder pads to the interposer board and they can become oxidised. Since the touch connector is located on the bottom board it is likely the problem. If this is the problem a good repair shop would split the boards and reball the pads and maybe run a jumper if the pad has come off completely. A dodgy repair shop will just reflow the board with hot air or a heating platform which will only be a temporary fix.
This error log is telling you that one of the sensors on the charge port assembly is faulty. It is trying to communicate with mic1 which it does every 3 minutes. If it doesn’t get a response it will restart the device. A new charge port should fix the problem. You will need to purchase this part from a reputable store and you can follow this guide.
Jerry is right there are a number of things that can cause a boot loop on the 7 series. The most common cause is a faulty battery or a faulty front camera flex assembly. I would open up the phone and disconnect the front camera connector from the logic board. If it boots normal you will need to replace it. If it is still the same you will need to install a replacement battery.
It is normal for the phone to boot when inserting the lightning cable. Your problems are most likely the screen and home button connectors. Remove the screen connectors and reseat them be extra careful with the home button connector and flex.
This is not possible. The data on the NAND is encrypted which is serialized with the CPU and logic eeprom. Even if you put your NAND in another iPhone 8 it would not work. There might be a really slim chance if you use a program called 3uTools and select restore while retaining user’s data. It should bring up the password screen again where you could have one more chance at entering the correct password but most of the time it fails.