With this approach you can't have page numbers on the front-end, just first, prev, next and maybe last. You can't jump to particular page. It is old technique and I like it, but if it would be usable it would be used by everyone but it is not.
1000 is tiny by DB standards but solutions like this one are often bolted without considerations.
I note this use case can be solved using keyset pagination instead of offset/limit, because the ordering of messages is stable: messages are never inserted in the middle of the list; they are appended at the end. We can attribute a number to each message, and use this message to filter and sort.
To do that aforedescribed accounting for us, and more.
If we have an pagination index over (topicId, deleted) on postTime asc.