I agree with much of what you're saying, but publishing was completely different in the late '90s. The last time querying worked was the early 2010s in YA dystopia. It's not accurate to say querying never works—only that it only does when publishing decides to clear the whole bench for one subgenre, as in did in the wake of the Hunger Games.
The query system is a relic. We don't need it anymore because, while an AI read isn't nearly as useful as a deep read by a skilled human, it provides better signal than a query letter does. If we can't give a fair read to everyone—and, given how few literary agents there are, and now many lottery players are out there, it seems we can't—then technology is the way to go.