Damn, are those slaves *****ren or grown ups? If they are *****ren, then its quite easy, just teach them to be submissive from a ***** age and they will stay like that when they grow up. The schooling system is a decent example, they brainwash everyone into respecting authority and rules, and generally being obedient, just by simply making everyone respect them from a very ***** age. This method is quite slow (its designed to be performed on a large scale after all), but it works in the long term.
If they are older however, its gonna be a bit harder, you will have to basically train them like a dog. Take away their food, and only if they are obedient they will get it as a reward. Its basic human psychology, when your body is desperate for some important resource (water, food, maybe even air), it will do anything to get it, including whatever you tell them. A less brutal method is to just give them a treat (anything that increases dopamine), but that won't work in case they're depressed, which they likely are if they have experienced freedom before.
Maybe you can even use some drugs that lower brain function (also called depressants), which will make your slaves basically dumber, and more likely to do whatever you like. However they won't be very useful in case you're using them for work, because they kinda do need a brain to perform basic tasks.
And in case you're horny and don't have time for brainwashing, you can always use chloroform to temporarily put them to sleep. Its quite easy to synthesize, only requiring bleach and acetone. You can find the exact synthesis on the clearnet if you want. Just remember to use a high concentration and make them breathe it in for at least 5-10 minutes, and make them exposed to it for the time you're performing whatever you want, just make sure not to choke them to death.