In your ad-hoc task there is a course_delete_modules task - failing. Wonder if that is deleting an assignment and that is what is affecting the conversion.
In moodle admin look for recyclebin. Set duration for 1 second and have the recyclebin show all the time in the course menus.
That hurries along the module deletions to trashdir where one can remove them manually.
Not sure your upgrade actually finished so from cli:
cd /path/to/moodlecode/admin/cli/
php upgrade.php
The very last process that does is check and set default settings for everything.
If it did indeed finish, the script will tell you not needed.
Also, in admin/cli/ there is a scheduled_task.php script.
Run without parameters will bring up help for the command.
php scheduled_task.php --list |grep cleanup
will list all the task for cleanups.
\core\task\file_trash_cleanup_task
\tool_recyclebin\task\cleanup_course_bin
\core_files\task\conversion_cleanup_task
I think you can run those individually while cron job is disabled.
Obviously you need to get control of this.
Am out of ideas ... cept one ...
Hope you began upgrades with a site backup! You might have to restore the site from the backup you took of the 4.1 ... importing the sql dump into a new database, change config.php DB array to match new DB.
Once restored and running ... then look into everything ... DB schema, Document conversions, etc. Do the recyclebin setting lower and showing in course menus. Get everything clean and working again. Make another site backup. Then do your upgrades again - this time from command line only.
One should not need to hack any core code.
'SoS', Ken