Earlier I did say the try backups using resources criteria ... ie, one backup with nothing but the quizzes contained in the course ... regardless of section the quiz is in. One backup with all the assignments in the course. Etc. That will be just as time consuming as what you are doing now.
Unfortunately, we took a side road ... health check ... and you've determined that quizzes are not the problem in the backup of full course.
But, we don't seem to be doing anything different with the problem thus results won't be any different and we are no further down the road in finding the issue.
So you've tweaked php settings upwards ... not solved.
The fact you can do those tweaks does give a hint as to how hosted, but not enough information about hosting setup, memory, etc.
And we have yet to actually try the cli backup script. Why?
It sounds like a technical issue so I would think one would have to seek and share more technical info ... yep, talk techie even though it's not our 'lingo'.