Why so complicated? DDEV has a nice feature for this: ddev.readthedocs.io/en/stable/users/configuration/hooks/…
Use "post-start" (Execute tasks after the project environment has started) in your ddev config yaml hooks:
hooks:
post-start:
- exec: "bin/console messenger:consume async_send_data"