A patient, yes, but with his own team of doctors!

I could have used the scripts you mention, say three months ago. The local Moodle admin had enough of the up-and-down and decided to go his own way, a journey with lot of foot work. He is going through question categories one-by-one and exports the useful/unique ones in to Moodle XML in the hope of building the new version from scratch during the summer break.
Still, I would like to have a look to understand from the SQL-side, if you don't mind attaching a zip file here in the forum or checking in to GitHub or a similar site.
I could have used the scripts you mention, say three months ago. The local Moodle admin had enough of the up-and-down and decided to go his own way, a journey with lot of foot work. He is going through question categories one-by-one and exports the useful/unique ones in to Moodle XML in the hope of building the new version from scratch during the summer break.
Still, I would like to have a look to understand from the SQL-side, if you don't mind attaching a zip file here in the forum or checking in to GitHub or a similar site.