Thanks Ken, max_input_vars looks fine, it's set to 10K.
If I catch your second question correctly, my assumption is based on the fact that the script ends in error in the middle of that decoding+unzipping function, so my guess is it treats very large pieces of scorm data in one variable.
More clues: after raising memory_limit to 512M, restore still fails, but without the memory exhausted message in the error_log. Besides, I didn't mention that the script ends before even showing a progress bar.