Chosen Solution
When plugged in it seemed to be fine, just turned off. After holding down the lock button for a bit the Apple logo appears. After that the lock screen becomes visible for a few seconds before blacking out, and shutting down. I have replaced the battery and the screen. The issue appeared after the battery replacement when the screen had already been replaced for a week. Please help.
The issue turned out to be out of all things a faulty charging cable. Thank you for the suggestion.