Easy.
Sort it all into folders and the tell Sonos to add or delete the library when you want to listen.
Thus <65k tracks in folder 1 (possibly organised A through to L) and <65k tracks in folder 2 (organised m through to z) and so on. EG you only delete the folder H and add the folder j when you want to listen. OK this is a bit of a fiddle, but Sonos doesn't take that long to change directories and index them.
Also cut down on the metadata. This helps.
If you read the forums, Sonos are aware of this. I had a long chat with a Rep on this subject and had to agree with him, that there is no way that you will have the time to listen to everything if you have more than 65k tracks. He had the figures all worked out and it would yake months of CONTINUOUS listening just to get through the collection. As most people listen to 2 hours maybe 3 hours every day, > 65k tracks will take you years to get through. His other thought was that there are many tracks that you will never listen to more than once........... then simply don't rip them in the first place.
Food for thought.