If it's only 5000 private keys, just import them into Bitcoin Core. It's the easiest way to check them privately.
Would it assign wallets with some balance on it to a particular key definitively or
It would still be randomized or perhaps merge all of it?
Importing a private key means just that: adding a private key to the wallet. That's it. No coins are moved, nothing gets "assigned" and nothing gets randomized.
I actually did that with
9375 potential private keys. It's quite demanding on system resources.