It was designed as an enterprise-type system and most of their installations are probably in the hundreds to tens of thousands as a result, I’d imagine. However they do have a lot of documentation in their product wiki about large scale installations and it looks like they’re working a clustered/HA edition in the next release. More at https://confluence.atlassian.com/x/qAMQCQ and other similar pages on the same site.
There are also some mature plugins in their ecosystem that support the kind of work you might have in mind (e.g. lets people self opt-in to groups or communities of practice) https://marketplace.atlassian.com/plugins/com.adaptavist.confluence.bubbles is one. If you are able to get by with the nonprofit free pricing, most plugins will also be free from my experience as they’re licensed through Atlassian’s marketplace platform and honor the same agreement. You might look more at that marketplace to see what other plugins would be useful.
They have a hosted version that you could play with as a trial if you want to get the feel for it before moving forward with a server install.