It's another level of insane to put hard limits for self hosted open source software. I'm surprised so few people in the thread have just changed the source code and build it themselves.
It’s not hardcoded; self-hosted version call their server to ask what is the limit, which is 10k if you don’t pay or unlimited if you do. There is absolutely no performance problem with >10k messages.