I am curious as to whether Thomas Jefferson's owning of slaves was challenged by his contemporaries such as Benjamin Franklin.
Or was his owning slaves a private affair uncovered by historians?
Yes! I know of at least one; although it doesn't call Jefferson out on owning slaves, it does call him out for not doing enough to abolish slavery as a whole. Benjamin Banneker, a free Black mathematician and surveyor and almanac writer, wrote to Jefferson when he was Secretary of State in 1791 with the stated intention of mailing the Secretary a copy of his newly written almanac. But the letter itself only mentions the almanac briefly at the end and spends most of its considerable length challenging Jefferson both delicately and directly on failing to live up to the values in Declaration of Independence and those of his Christian religion. Here is the full text on the National Archives website.
As Banneker notes at the beginning of the letter, he was quite aware of Jefferson's status and addressed him very respectfully and wrote very formally--which also serves to display his own eloquence as a writer and further his point that the races are fundamentally equal (in his words: "however variable we may be in Society or religion, however diversifyed in Situation or colour, we are all of the Same Family, and Stand in the Same relation to [God].").
Most specifically, Banneker focuses on the framing of the American Revolution as a struggle for freedom against tyranny, and quotes the Declaration of Independence at Jefferson to lament the inability of early leaders to follow through on their ideals when it came to slavery. I'll excerpt the two paragraphs that address these points directly here, because Banneker says it himself better than I ever could:
"This [the Revolution] Sir, was a time in which you clearly saw into the injustice of a State of Slavery, and in which you had just apprehensions of the horrors of its condition, it was now Sir, that your abhorrence thereof was so excited, that you publickly held forth this true and invaluable doctrine, which is worthy to be recorded and remember’d in all Succeeding ages. “We hold these truths to be Self evident, that all men are created equal, and that they are endowed by their creator with certain unalienable rights, that among these are life, liberty, and the pursuit of happyness.”
Here Sir, was a time in which your tender feelings for your selves had engaged you thus to declare, you were then impressed with proper ideas of the great valuation of liberty, and the free possession of those blessings to which you were entitled by nature; but Sir how pitiable is it to reflect, that altho you were so fully convinced of the benevolence of the Father of mankind, and of his equal and impartial distribution of those rights and privileges which he had conferred upon them, that you should at the Same time counteract his mercies, in detaining by fraud and violence so numerous a part of my brethren under groaning captivity and cruel oppression, that you should at the Same time be found guilty of that most criminal act, which you professedly detested in others, with respect to yourselves."
How effective was Banneker's letter?
Well, Jefferson wrote back about a month later. Here is the entirety of the response.
"Sir
I thank you sincerely for your letter of the 19th. instant and for the Almanac it contained. No body wishes more than I do to see such proofs as you exhibit, that nature has given to our black brethren, talents equal to those of the other colours of men, and that the appearance of a want of them is owing merely to the degraded condition of their existence both in Africa and America. I can add with truth that no body wishes more ardently to see a good system commenced for raising the condition both of their body and mind to what it ought to be, as fast as the imbecillity of their present existence, and other circumstances which cannot be neglected, will admit.—I have taken the liberty of sending your almanac to Monsieur de Condorcet, Secretary of the Academy of sciences at Paris, and member of the Philanthropic society because I considered it as a document to which your whole colour had a right for their justification against the doubts which have been entertained of them. I am with great esteem, Sir Your most obedt. humble servt.,
Th: Jefferson"