Sorry- long post here, mostly disputing others. I'm not trying to be a jerk, but many of the arguments in this thread seem overly simplistic or to rely on assumptions that the game just doesn't support. Moreover, it seems like there's at least as much "Why would you do that? Don't do that" as actual addressing of the OP's question about alternatives to the harsh version of slavery that most modern depictions show.
For clarity, I agree that slavery as we usually think of it is absolutely reprehensible, and being enslaved is a terrible thing, no matter the style of slavery. But I don't think it is nearly as unambiguous as some of you claim.
When fantasy settings do bring up slavery, it's unambiguously evil. It also completely ignores the fact that within the setting itself there are far easier methods of getting field work done than enslaving people. Wizards who can mass summon extraplanar creatures and mass produce golems have existed for thousands of years and are a dime a dozen.
I think you're making a lot of setting assumptions here.
Let's talk about one possible origin of slaves: as prisoners of war. Slavery arose, in some ancient cultures, because there was enough food to leave your POWs alive. Otherwise... you kill them.
"Better to die on your feet" stuff aside, which is worse for a guy whose tribe has been crushed- being executed along with his family, or being kept alive and fed in return for hard labor for life? Most important to the equation is the kids; the POW might be willing to do just about anything to keep his family alive.
So, in the right setting, slavery need not be unambiguously evil; in fact, I've used it in exactly that way before. The good-aligned, more merciful people in such a society take slaves
to avoid unnecessary slaughter of innocents.
As to high-level wizards being "a dime a dozen", outside of the Forgotten Realms, they sure don't seem to be all that common to me! Greyhawk has maybe a dozen or so at a time, most wrapped up in their own affairs. Eberron npcs are very rare above about 6th or 8th level. In my own campaign, if there's a wizard powerful enough to cast a 9th level spell on the same continent as you, pretty much everyone knows it- such a powerful spellcaster is rare, indeed.
So I have to say, your "dime a dozen" argument really doesn't hold water.
The reason it is an unambigously evil institution because it is ownership of another person and their legal status is no more important than the master's favorite horse (at best). Servus non habet personam (A slave has no persona ... is not a person). We take laws and rights for granted in our modern era but there were ancients who saw the institution as morally wrong as well.
This is a huge assumption that relies on a version of slavery where the slave is no more valuable than the master's favorite horse. Again, there are serious assumptions about the nature of the campaign world tied up in this. What about criminals enslaved for their crimes and forced to work the fields to feed the rest of society? What about a system of slavery where the slaves have rights (including the right to own slaves of their own!) and privileges and are well-treated, but are technically property of a family or estate that has owned theirs for generations in a system that has shown gradual improvement in their treatment until the 'slaves' have almost every right that their 'masters' have?
Let's not oversimplify, especially in a thread whose whole purpose is to explore the possible complexities of the topic for worldbuilding purposes.
20th-level wizards are reality warpers whose power is limited only by what spells they know. There exist a virtually infinite number of spells that can do pretty much anything imaginable. New spells have to come from somewhere. There's probably a spell to instantly create golems, or speed up time so that construction takes only a few seconds, or a spell to turn dirt into gold, etc.
There are, at least to the best of my knowledge, no spells in official sources that do anything you want. Even
wish has limits.
I've yet to see a spell for making permanent laborers, short of
animate dead (which comes with its own problems). It's fine to assume that such a spell must be out there somewhere
in your campaign, but in many settings, magic has proscribed limits. A really common one (for purposes of balance) is "no eliminating massive costs in money and time for magical work". In fact, in the Epic Level Handbook for 3e, adding time and money is a way to make spells less difficult to cast at epic levels.
So while you might be able to research an epic spell to instabuild a six-pack of golem laborers, you're going to need a 40th level wizard to cast it, you're going to have to convince him to create it (at great cost in time, money and xp), then to cast it, then to cast it
over and over again until he's replaced... how many laborers, exactly?
While you seem to think in terms of settings being implicitly high-magic, I think a close look will reveal that most published settings are actually fairly low-magic (excepting the FR and admitting Eberron as an odd case of prevalent magic with few high-level npcs to create it). It's not a safe assumption that you can find "Instant Golem" spells in most campaigns, and even if you could, there is a tremendous logistical issue with getting them to the fields, keeping them on task, etc.
If wizards can create new kinds of monsters, then it should be possible to create living, self-replicating factories that churn out golems. Von Neumann machines, grey goo, etc.
Why? Says whom?
There's also Wish, which can duplicate the effects of all lower-level spells. When you get into epic levels then everything pretty much goes out the window.
First a quibble-
wish cannot duplicate all lower-level spells, just most of them. You won't be able to ape an 8th level cleric spell (at least in 3e).
But about the epic stuff, sure- you can literally do anything. So just how many epic level wizards are there in an average milieu? How many of them are going to spend years and millions of gps and xps to build better farming tools?
Furthermore, 20th-level wizards have literally superhuman intelligence and probably think much differently than we do. Do you honestly believe that someone as smart or smarter than the smartest people who ever lived on Earth, who can use magic with purely arbitrary limitations, is not going to actually use their vast intelligence to dramatically alter the world around them forever and will just go on pointless adventures where they kill monsters and loot corpses?
That's a pretty specious argument. I don't think anyone's arguing that epic level pcs just go kill things and take their loot.
However, I think that's far more likely than that they spend all their hard-earned resources working to change the economy of one country or another. For one thing,
a country is too small of a matter for epic-level pcs to really care about. At least in most cases that I've seen, run or played, epic-level pcs are busy negotiating with gods and arch-devils, constantly moving from one world or plane to another, are fending off attacks from their archfoes, etc.
Frankly, epic-level pcs typically have more important things to do than worry about slavery.
Now, I'll totally grant that I am inserting a lot of setting assumptions into this argument about epic-level pcs, but they're arguments that arise from the rules rather than being arguments that rely on a certain interpretation of setting that seems contraindicated by both existing examples (e.g. the number of epic-level npcs on most published worlds) and the rules themselves (e.g. demographics in the 3e DMG clearly show that there aren't many, if any, epic npcs to be found in the typical world).
Much as with Seed AIs modifying their own code and find ways to circumvent any and all laws imposed upon them by their programmers, that wizard is going to find ways around the laws of magic and will optimize in order to make reality their playground.
Magic is explicitly not science. It may simply not be possible to do this. And even if it is (in a given campaign), realize that your argument here boils down to "Well, even if the rules say you can't, sure you can!"