To answer my own questions:
Actually, this is now obsolete. At least for posts since the issue of not deleting posts of a deleted topic was fixed some time back.
Posts older than that will still need some sort of cute solution.
Use the DISCOURSE_DB_PASSWORD which is in app.yml