How can I correct error code 4005 when trying to restore my iPhone?

Hi all
Please can you help?
I am trying to restore an iPhone 5.
When I connect to iTunes and start the restore process, iTunes extracts the software then says "waiting for iphone", it looks like the iphone is trying to restart but the startup screen is showing some sort of script. The only things the phone shows now is the script or the connect to iTunes screen.
iTunes says "The iPhone could not be restored. An unknown error occured (4005)"

I have now tried the process repeatedly but keep getting the same trouble.

Please can you help me fix this phone.
Thanks in advance
Have you tried to perform a forced restart?

https://support.apple.com/en-us/HT201559
Put the device in recovery mode and restore it via iTunes. By the way, information about error code 4005 can be found via the following link.

https://support.apple.com/en-us/HT201444

Original thread: https://forums.imore.com/threads/how-can-i-correct-error-code-4005-when-trying-to-restore-my-iphone.333087/