If i recall correctly there’s been a few lawsuits against LG and Google regarding a couple of their recent phones. Nexus 5X is one of them, the most common problem is that it just get stuck in a bootloop though and usually didn’t even show a sign of charging.
Sorry for not replying with a fix, just wanted to inform you that it’s pretty common to get problems with your device and from what you’re saying it seems like a PCB problem as most of the problems regarding Nexus 5X.