”Slave” in the scriptural context is much larger than the traditional, limited use of the term in the US for its system of chattle bondage, serving more broadly as a synonym for servant, or serf, or peasant or for any other social position which forces you to submit to the authority of another or others.
Every people in many historical times have been in such a position. Scripture first says to the socially subordinated that their plight, whatever their social obligations, are still under God’s authority and that He will reward or punish according to His law regardless. Thus the slave is a child of God regardless of his or her inferior status socially. This is why our forefathers could maintain the optimism of God’s actions towards justice on their behalf and why they were certain of God’s eventual liberation of them.
Similarly, those who are, at a particular historical moment, in social positions of dominance, relative to others, the “masters” are charged with conducting themselves in a godly matter with respect to their charges for their rule is existentially temporary and under the same judgment. God is no respecter of persons.
Thus those who are “on top” now should relate to others in a way that shows their submission to God and their knowledge that their dominance over others is only for a set time. Those subordinated should not let the corruption of subordination corrupt them for they are being groomed for eventual rise.
Would-be social “masters” are wise to remember that the “slave” today may be their divinely anointed sovereign tomorrow. The brothers of the one called Joseph in scripture learned this lesson, the hard way.