Just found a simple equation to balance supply and demand that could be easily introduced in btc source code:
next block size limit = previous block size limit + (total fee in the last period / avg fee in the previous period - space used in the last period) / block occupancy rate for the last period
Your equation does nothing to address the
issue I brought up previously. Miners can and do receive transaction fees in ways that are not attached to the transaction. For example, viaBTC offers a paid transaction accelerator
service for people who have attached too low of fees to their transaction. They charge a fortune for this service, so it is not widely used, but if pools have incentives to show transactions having lower fees than is actually the case, you can guarantee more pools would offer this service, and the cost would be very low.
As you said it is not a common practice, therefore it shoudn't have a significant impact on the result of the equation.
Now I challenge you to find an equation based on "not centralizing bitcoin too much".
Well, I had tried
in the past, but it was a function, not an equation. It made me feel very ambitious.

Yes, I think function is the right word, ultimately we want to find a function but for that we need to have an equation!
Just found a simple equation to balance supply and demand that could be easily introduced in btc source code:
next block size limit = previous block size limit + (total fee in the last period / avg fee in the previous period - space used in the last period) / block occupancy rate for the last period
The harder part is testing the equation on various network condition and accepted by the community.
Absolutely, we can calculate the next limit without applying it and see if it seems to work in theory. If it does seem to work then we can give the system a test run, we would set a floor and a hard cap in the testing phase.
I'll just explain my equation to make sure everyone understands it:
total fee in the last period / avg fee in the previous period = quantity supplied (Qs) at the previous price for the total amount that was paid in the last period
Qs - space used in the last period = excess demand in the last period before considering the block occupancy rate (a negative value means there was an excess supply)
(Qs - space used in the last period) / block occupancy rate = excess demand in the last period after considering the block occupancy rate
Now I challenge you to find an equation based on "not centralizing bitcoin too much".
See
BIP 103. The exact number and equation definitely need more research though.
It's an interesting proposal but it doesn't address the "market inefficiency" problem. I think this is where I and ranochigo have a disagrement, I don't think Bitcoin will ever scale as a medium of exchange because our credit cards are just too convenient (and we generally don't have to pay any conversion/transaction fee to make a purchase) but I do believe that it can answer a particular need and the block size limit can be high enough to answer that need without being too high.