The comparison with slavery is often used in discussions, with different purpose. To name certain non-consensual types of sex with children slavery is of course justified. But there are some other, more controversial comparisons:
For example, Finkelhor uses a comparison with slavery in the following argumentation:
"... we would bridle at the notion that the question of slavery should be decided on the empirical question of whether black people or any other slave group experience more well-being under slavery than in freedom. Something about slavery is so offensive to our fundamental notion about human relationships, to our system of ethics, that we do not decide the issue on purely empirical grounds. Testimony from even large numbers of slaves that they preferred the condition of slavery would not convince us that "consensual" slavery should be allowed. Similarly, there is an ethical dimension beyond the empirical dimension that needs to be included in our understanding of what is wrong with sex between adults and children."
Reading this argumentation, we see the interesting combination of words "consensual slavery". What could it be? I guess, somebody who makes the same thing as slaves - hard work - on a consensual base. But this is not forbidden, but the base of free market economy. Thus, the comparison is nonsense.
On the other hand, there are some interesting similarities:
First, the status of the rights of the child and a slave. Black people were "not people" in the pre-Civil War South. And children are "not people" in the present environment. The opinion of the child does not count in legal questions. Some laws protect the "interests" of the child, but the decision about this interest is left to adults - parents or officials. The child cannot decide.
There is also an interesting similarity in the access to knowledge. On one hand, that the slaves are stupid was a common argument for slavery. On the other hand, before the Civil War, it was illegal to teach slaves to read in many Southern states.
Here we have a full analogy with the access to sexual information. It is used as an argument in favour of aoc-laws that children have not enough knowledge about sex. But child- and youth-protection agencies restrict the access of children to sexual information.
It should be remembered that the slave-owners also did pretend that they want the welfare of their "happy carefree" slaves.