I see the problem but don't agree with the solution.
It's like wanting to stay poor so if you get robbed, thieves won't get much money from you.
Bad actors will always find ways to DoS if they want to.
The free market will fix this problem. What if custom web apps want to pay money for these "databases"? And we're preventing relays from finding a monetization scheme
An advanced query NIP could be discussed and implemented by more specialized relays, that are either subsidized or can charge money for access