There is a known problem on newer iPhones, with a “Trip Battery” malware in the latest iOS allegedly to prevent “risk to customers” when in fact it happens even with a genuine battery. It can sometimes happen if the battery ever goes below the minimum, though Apple refuse to admit this can occur. It can also be set off by replacing the screen as well, as the battery has to be disconnected.