You wrote:
> In my case the owner:group of the crontab that is running the main cron every 5 minutes was root:root.
Why?
The documentation says:
$ crontab -u www-data -ehttps://docs.moodle.org/en/Cron#Finding_the_right_place_to_put_the_command
$ crontab -u www-data -ehttps://docs.moodle.org/en/Cron#Finding_the_right_place_to_put_the_command