For a successful restore:
Make sure the battery is holding some charge, you are using a known good original cable, and charging port is clean.
Force the phone into DFU mode.
Disconnect all the flat cables from the board, keep only the display cables (2 cables), lightning/charging dock cable, battery. You can leave power on/off cable and home button cable to force DFU.
Now try to restore from DFU.
The above in general will get you through any restore successfully if the phone is not suffering from a major hardware issue that prevents the phone from completing the restore process.
ERROR 9:
Now the bad news: I doubt Error 9 will be solved by the above steps. "We" believe it is due to hardware issues on the board, and we think the phone is dropping the communication with iTunes during the restore process.
It could be for a number of reasons, some of them fixable, some of them we have not be able to solve.
If you don't succeed in restoring as per the instructions above, there is nothing you can do as a DIYer in my humble opinion, at this time. Even for seasoned micro solderers, it can be a challenge.
Here's an example of an Error 9 iPhone 6 that we were able to solve by drilling in the CPU of the iPhone to rewire missing lines. In this case we were not able to save the data because the iPhone was mishandled before reaching us, which led to data corruption. Luckily the owner had his photos backed up.