LG G3 Restart and Shut down automatically
Lots of LG phones are showing up bootloop issues. The issue you are facing can be closely related to other bootloop issues seen in LG phones. And if it is, I dont think you can do much to fix this issue. 

You may however give a try installing a light weight OS like lineage OS. I had faced similar situation with Nexus 5x. Installing Lineage OS helped a bit(restarts/sudden shutdowns became less frequent). In my case replacing motherboard solved the issue for me.