I think you better ask Apple Support why this doesn’t work and how to troubleshoot Mac cron jobs.
Native Docker way would be to install side-car container running cron jobs:
cron:
image: nextcloud:apache
restart: always
volumes:
- nextcloud:/var/www/html:z
entrypoint: /cron.sh
depends_on:
- db
- redis
see Docker examples
You might be interested on Nextcloud docker-compose setup with notify_push (2024) showing almost complete setup.