A very simple fix for that is to use the systemd log driver to send all the container logs to journald. Then you can set a size or time limit on journald.
https://docs.docker.com/engine/logging/drivers/journald/
I believe Podman can do something similar.