IIIRC, this normally runs by default (autovacuum option in postgres).
Check to make sure that autovacuum is enabled and does what we expect.
Otherwise setup cron to run a container to periodically vacuum (used to be a crunchy container that did this but that does not seem to be a thing anymore).