The notion of slavery being unethical had been many centuries old at that time.
I guess nuance or detail is too hard.
By the time of legal reforms of the 18th century I think this was overt, specific focal action. They were using parliament, and outside parliament agitation against capital investment in slavery. In many ways, delaying reform into the mid 19th century was an american story. The supply side from africa dried up long before the southern states were ready for the transition.
Slavery in the british colonies (west indies) had been backfilled by transportation from the UK prison system. When that ended, the hulks (ships moored in the rivers with prisoners) overflowed, and Australia happened, to remove the hulk problem. Ending the australian penal colony system also ended how Britain dealt with trade unionists and irish freedom fighters.
It's sort-of fictionalised in Neal Stephenson's "system of the world" but it has factual underpinning, if this is perhaps anachronistic/ahistorically portrayed in the books.