Thousands? Wow. I'm curious to know why!
Does the app have to be free, or will a low-cost app do?
The reason why I ask is that if you were to purchase an app (which generally costs no more than $3, hardly a high cost), the developer may be willing to help you with this.
However, I presume that you'd have to test the proposed app on your phone and, if it works, contact the developer before purchasing the app.
I use Call Blocker Gold, which has a massive list of community-shared numbers, indicating that it must have the ability to handle this sort of thing. (You can currently get the app free ? read its Description.) It also allows wild-cards, which would probably be useful to you. Try it out and let us know what the developer says.