I have since moved on to another job that doesn’t use Middleman. Based on my memory, the biggest issue with Middleman was that the build was single threaded. That may or may not have changed. When I had to support about 320 pages, I had to write creative bash scripts that would parallelize the page generation by spawning multiple
middleman build processes for different subpaths. The end result was that the whole site would take about 5 minutes to generate on an m4 large EC2 node. (Yes, to me, 5 minutes was problematic!) Though, to be fair, those pages had heavy layouts, such as multiple sidebars, multiple tabbed content, accordions, etc., and would include many partials per page. There were also tons of high resolution images, PDFs, file downloads, etc.
I would say, based on my experience working with Middleman between 2013 and 2017, you might want to look elsewhere if you need to support thousands of pages per site and beyond. The lack of multi-threaded compilation and incremental builds means generating a large site during the build process will eventually become unbearable.