About the 5000 limit, is exactly the same for the page library? Considering you can only have one per site, how do you accomplish large knowledge base sites with 10000 pages?
5000 is not the item limit, it's the list view threshold limit inside SharePoint that can render items at one go, especially if you're in SharePoint classic view. The exact item limit is 3 million, so 10000 is still a long way to go.
Read on: https://docs.microsoft.com/en-us/sharepoint/install/software-boundaries-and-limits-0 and https://docs.microsoft.com/en-us/office365/servicedescriptions/sharepoint-online-service-description/sharepoint-online-limits.
The other way is to go to the SharePoint Central Admin (if it's not SharePoint Online). Go to Application Management > Manage Web Applications. Then select the web application and click General Settings > Resource Throttling.
You can change this setting, but my advice is to avoid modifying this and go with the first approach. Changing this to a bigger number will have an impact on your SharePoint SQL Database Server. You can also change little by little and monitor your database workload.
Note: In SharePoint 2016 or 2019 or Online version using modern site template, this setting is useless as the data is rendered partially as you scroll. Only when you decided to go to the classic view, then it matters. In SharePoint Online, you can't change the Resource Throttling and it will stay at 5000.
pages are the same as items and docs