I have a theory where I compare the Roman slavery era to the current wave of automation, fortunately our automation do not commit the huge suffering slavery inherently does, but they are analogous in the sense that slaves could do everything a Roman could do for free, so, how did unemployment was avoided back then?
Sadly, this theory doesn't work, and it's not the first time it's been suggested. The Roman economy was a slave economy, but slavery, with its severe constraints in numbers and expense, to say nothing of social factors, did not seriously encroach on the free labor market, which occupied its own separate niche that largely did not overlap with the servile labor market. Similarly, the idea of slavery stunting the Roman economy isn't taken particularly seriously anymore. Moreover, the distinctions between a potentially fully-automated economy and a slave economy are significant. Apart from completely different operating costs--slaves, unlike machines, are not cheap and are not in many types of work a particularly cost-effective means of fulfilling a labor need--a slave economy operates under restrictions of supply (there are only so many humans that can be made slaves) as well as social pressures, in that no historical slave economy has ever existed that presumes that slavery should replace all free labor, meaning that inherently there is some niche for such labor to be filled that is sustainable