Chosen Solution

Wow, that was quite the “question”? Because you bought it on eBay, it is impossible to know the history of this phone prior to your purchase and frankly, it’s not worth spending too much asking you because there is no reason to trust what the eBay seller will tell you (no offense to the eBay seller). The BSOD or Infinite Boot Loop are problems typically caused by either Long Screw Damage (while replacing or removing a screen assembly) or a bad charge circuit (U2). You do state that the phone is also having charging problems. Normally, the first thing to try is the battery and then charge port. You’ve already tried all kinds of non-hardware “solutions”. Don’t waste time or money on iOs Software repair software. To be blunt, you’ve wasted way too much time troubleshooting this on your own. Find a shop that can do micro-soldering repairs and they will properly diagnose the problem for you and you won’t have to buy batteries and ports and whatnot, all possibly for nothing. The 5S is still worth saving (minus your Touch ID), depending on your location and your access to used phones at a good price.

I am sorry to hear about your iPhone blue screen problem. Have you tried this solution? Maybe it will help. http://vkrepair.com/iphone-5s/iphone-5s-

Long screw damage. Classic 5S symptoms. Very tricky micro work, best of luck.