How does Postgres compute the row count estimate during query planning
There is no better way to estimate the row count for the generic plan.
If you chose to go by the frequencies of a most common value (MCV), there would be several problems:

Which MCV do you choose?

The estimate would be better assuming that both parameters are MCV, but that is an unfounded assumption.  If both were rare values, the estimate would be even farther off the mark than the current estimate.


Choosing the average is the best we can do: it is something of a middle ground.
Your case is so far off the mark because one of the values is extremely rare, which lowers the custom plan estimate, but since there are few distinct values and one of them is very frequent, the selectivity is bad at average, and the generic plan estimate is far too high.
You have two choices:

Use dynamic SQL so that you always get a custom plan.

Change the query to read
WHERE filter_1 || '' = ?

so that it cannot use the index.