Shuttle attempts to do this automatically when you launch the app. It's really a problem of the media store, which creates genres but doesn't remove them when the songs are deleted.
The only other suggestion is to completely rebuild the media store. There's instructions for that here:
I've used Shuttle with a library of around 10k files on a 64 GB micro sd. This is probably one of the better options for you. Be sure to disable the feature that automatically downloads album and artist art if it starts to slow things down.