And Rocket.Chat can pass options to the driver from an environment variable: https://rocket.chat/docs/installation/manual-installation/mongo-options/#passing-extra-options-to-the-mongo-driver
So all you’d need to do is add the environment variable MONGO_OPTIONS='{"useUnifiedTopology": true}'
.
Although I already worked around this issue by using an lxc container. But maybe it will be helpful for someone else.