Connection error to container postgres14 when processing TicksAndRejections

Hi to all,
I've been running an ODK central server for a client for a few years, started with Aggregate and upgrading to Central. The experience has been smooth until recently: there's a slight issue I'm unable to deal with with which I'd l'd like your expertise.

1. What is the issue? Please be detailed.
The automatic removal of forms and submissions after 30 days in the recycle bin is not done.

When I check the central-service logs, I find the following which seems to be the source of the problem:

unexpected worker loop error: ConnectionError: getaddrinfo ENOTFOUND postgres14
at Object.createConnection (/usr/odk/node_modules/slonik/dist/src/factories/createConnection.js:55:23)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

This is very weird, because all other functions in the server work fine otherwise, and connection to the postgres container works fine otherwise

2. What steps can we take to reproduce this issue?
ODK central is installed on ubuntu 20.04 on an OVH Virtual Private Server, following the default install described in docs.

The removal of forms after more than 30 days used to work until an upgrade to ODK central v2023.3 or v2023.5. Not sure of the exact moment the problem started to appear has it went undetected for a while.

UFW is disabled on the server as per instructions. No customizations have been implemented

3. What have you tried to fix the issue?
I have tried looking into forum posts that relate to connection errors in the database, tried to tweak the DB_HOST env variable, but apart from actually breaking the connection to database, it didn't solve the issue.

4. Upload any forms or screenshots you can share publicly below.