It is hard to say if you don’t open the phone, so the best you can do is open up the phone and look if the logic board isn’t broke. If logic board isn’t broke then I would try a new screen, these aren’t so expensive anymore.
You wrote: the iphone only seems to turn on when I connect it to the computer, as soon as I pull the usb cable out the iphone also turns off. While the battery was in good condition. So i think the best you can do is try a new battery because the other things you allready tried.
Does the phone came in contact with liqiud ? If not try to connect your iphone to Itunes or 3U Tools with a disconnected cam and screen, only connected to your logic board is dock connector and battery and then do the update/restore. After the update/restore you can connect the screen, camera etc one by one so you know where the fault is.
If repair is more than $25 then it is cheaper to buy a damage Iphone 5S (for example a damage screen and backhousing, there are logic boards on chinees website for $10-15$) and transfer the logic board and home button to your iphone.
Maybe you havent transfer the filter from broken screen to new screen, the filter for proximity sensor. Or you can test this by stick a piece of tape on your new screen and colored this with a waterproof marker to make tape darker ( after the test you can easely take away the tape) so the sensor get less light.
adhesive metal spacers