Hattip Carl Quintanilla. https://bsky.app/profile/carlquintanilla.bsky.social/post/3lrykqtmtu22l
Other goodies:
https://bsky.app/profile/carlquintanilla.bsky.social/post/3lrykxridh22l
https://bsky.app/profile/carlquintanilla.bsky.social/post/3lrykwlw5ps2l
https://bsky.app/profile/carlquintanilla.bsky.social/post/3lryknme2wc2l
So the earliest we have of this kind of saying is from Don Quixote where it is about deflecting hypocritical criticism from the 1600s. The shiny kettle/black pot version is more recent one gaining prominence in the late 1800s.