SSL inspection ... not sure if that's a rabbit hole or not, but ... the .mbz file is uploaded first, then un-compressed to a work directory (moodledata/temp/backup/xxxxx) on the server and it's from there the restore process begins. Constructs a 'plan' then executes that 'plan' on the server. It's there that the error occurs.
So there is no networking involved except what info the server might pass back to a workstation attempting to perform the restore progress.
There is sessions ... those should be long enough to complete most things. Default for sessions is to use files not DB (moodledata/sessions/ directory) ... is your site by chance using DB for sessions? Cron job does have a task for cleaning up expired sessions.
And your 4 has installed all the addon modules that the version 3 course backup contains?
You mention that moodle_backup.xml is populated ... that's related for sure ... used to build those 'plans' - it's the 'road map' for the course restore. Sifting through that file, however, is an adventure!
Sent you a PM with an offer - FREE! Please consider.
'SoS', Ken