The creators of ElderJS have something like 50k pages that they manage, so maybe you should look at what their model is.
Otherwise use Strapi, Directus, or some other open-source headless CMS.
There's no reason to start a new project with WordPress today. It is a dumpster fire.
nextjs/gatsby ?
I've seen WordPress server as many pages at an enterprise level with lots of traffic. WordPress is a great option, and will server as many pages as you need well with decent caching.