The existence of slaves and the usage of "unsavory parts of medieval settings" isn't the problem. The problem is the dime-a-dozen protagonists who are willing to own another person with complete obedience due to magic.
The problem is the author trying to justify something that they could have...