Let's say that we figure out a plan for enslaving 10% of the population. If we do that, then each of the other 90% will receive 10 units of happiness that they would not otherwise have. The slave will, of course, lose 50 units of happiness. However, 10 units of happiness spread of 9 people is 90 units of additional happiness, which outweighs the 50 units of happiness lost by the slave. Therefore, based on utilitarianism, we have a justification for slavery.
Now, these calculations aren't accurate. But we are left with this question: is this the real reason that we oppose slavery. Because the pain of the slaves outweighs the pleasure of the masters? If utilitarianism is correct, then that must be our reason.