"The words of the Preacher, the son of David, king in Jerusalem ... I the Preacher was king over Israel in Jerusalem ... I am come to great
estate, and have gotten more wisdom than all they that have been before me."
The author of Ecclesiastes claims to be the wise, rich son of King David, which is to say, Solomon. He isn't. Ecclesiastes was written
(forged) about six hundred years after Solomon died (if he ever lived, that is). 1:1, 12, 16
"I got me servants and maidens, and had servants born in my house."
The author seems to be bragging about owning slaves here, with no indication of any disapproval of slavery.