You actually have the etymology backwards - it is not that the word "slavic" comes from the word "slave," but rather that the word slave comes from the word slavic. From the Oxford English Dictionary: "medieval Latin sclavus, sclava, identical with the racial name Sclavus (see Slav n. and adj.), the Slavonic population in parts of central Europe having been reduced to a servile condition by conquest; the transferred sense is clearly evidenced in documents of the 9th century."
I don't know much about the 9th century in Europe, hopefully someone will come along who can talk about the medieval Mediterranean slave trade in more detail. However, David Brion Davis discusses this briefly in his The Problem of Slavery in Western Culture (page 52). Davis's key point is that, even long prior to the beginnings of African slavery in Europe, the word slave had an ethnic/foreign connotation. Davis compares the latin word servi, which has no ethnic connotation, with the new word sclavi, which was used first by the Germans in the 10th and 11th centuries, and then by the Italians in the 13th century, to indicate captives brought out of the Black Sea region as part of a Mediterranean slave trade. The word rapidly spread into English and French as a way of distinguishing "unfree foreigners from native serfs" (Davis). When Spain and Portugal began to import African slaves in the 15th century, they applied this existing term, the meaning of which had shifted from denoting slavic servants with a notably lower status, to foreign servants with a notably lower status of any ethnic origin.
There's no universal agreement on the exact etymology of the word 'slavic' and 'slavs', however, as usual with etymologia incognita, there's a number of valid theories.
In 18th century, the most common theory was that it stems from "slovo", a word that exists in a number of slavic languages that means either "word, talking or letter". In 19th century, Bohemian phililogists J. Dobrovský, P. J. Šafařík and F. Miklošič came forward with a theory that due to prefixes "-en, -an, -enin, -anin" in slavic languages, the base of "slav/slov" would imply some kind of a toponym. Due to the similarities to lithuanian "salava" - "to flow", they argued that Slava / Slova must've been the toponym of a river in whose floodplains the ancestral slavic tribes lived. Later, "slava" and "slovo" would come to form its own meanings in different slavic languages. The toponym theory is seen as one making most sense.
Other theories claim that the name didn't come from within the slavic tribes, but from outside influences. Some theories associate Scythians with early Slavs, and thus connect the etymological development parallel to cultural one. According to some, it stems from the protoindoeuropean "(s)lawos", akin to greek "λαός" , which means "folk, population"
One theory that's important to your question states that the word comes from the Gothic verb "slawan" which means "to be silent". This theory draws parallels to the fact that multiple slavic languages call germans "mute" (polish "niemcy", croatian "njemci"), as it probably stems from the fact that early germanic and slavic tribes couldn't properly understand each other, and thus considered one another 'mute'. The problem this shares with the theory you stated, that 'slavic' comes from latin 'sclavorum' is the improbability of a nation internally calling themselves by something that would be considered pejorative. ( aforementioned Niemcy still call themselves Deutsch, as that's an outsider's name, not a native one )