Messages are not stored, only forwarded. This means that very little server infrastructure is required.
Additionally, there are offerings for companies (mostly the same app, but with MDM management possibilities) that use subscription based pricing: https://work.threema.ch/
Messages are not stored, they are deleted as soon as they are downloaded from the server.
So if you assume that energy cost is low and servers can be used for a long time, it feels like this could pay for lots of sent messages.
They host everything themselves, so only the physical space for servers needs to be rented.
They don't store the messages on their servers. All messages are only stored on the end devices of the users.
The servers operate only as a message relay and only store the message until the message is delivered.