The iPhone "xyz" could not be updated. An unknown error occurred (4000)
Just update your iPhone using your iPhone update function, not the one offered in iTunes.
I have overseen another possible solution in the link of the question:

&quot;Finally just put iPhone into Recovery Mode and did an update.
SUCCESS.  It did the 12.4.1 update and all seems fine.&quot;

Probably that would have helped as well. But the easiest solution is just to update your iPhone as you would do anyway if you did not have iTunes.