Can you trick Apple Music/iCloud Music Library by labeling music files as audiobooks?
Finally got around to trying it, and it works. Once I'd marked enough files as "Audiobook" to get the remaining music files under 25k, Apple synced the remaining files with no problem.

This seems like a much easier solution than the "two libraries" solution that other people are recommending...although it would make actual audiobooks more of a pain to deal with for people who use audiobooks.