Your #5 ... takes web server and/or WAF's out of the loop, it's just php talking to your DB then.
Do save the backup to a designated directory outside of the sea of files in moodledata/filedir/
In admin/cli/
php backup.php will bring up help screen.
If the course is really large, one could also use a 'no hang up' wrapper around the command.
nohup php backup.php with opitons & [ENTER]
That puts the command in a background process, starts a nohup.out log file at location and allows you to log out of the shell session.
That will get the course backed up but then you will also have to use the reverse of that ... restore.php - same location as backup.php
That will not fix the big question bank issue.
to fix that yes, get the course quizzes into course categories rather than system wide.
'SoS', Ken