I found the cause of the product page crashing when there are a large number of attribute combinations and the “blocklayered” module is installed.
In the Product class, within the two methods getAttributesInformationsByProduct() and getAttributesParams(), SQL queries have been added with the following condition:
if (Module::isInstalled(‘blocklayered’) && Module::isEnabled(‘blocklayered’)) {
And these are the ones generating such a huge number of SQL queries on the product page.
Interestingly, after removing these SQL queries from the Product class, the navigation filter block on category pages works correctly 🙂
I would report this on GitHub, but there’s no point, because no one has been handling these issues for almost a year now.