It seems to me that a "good Doctor" (as you mention in your subject) and
a "successful Doctor" (as you mention in the body of your post) are not
necessarily the same. While I won't argue that any of the successful
Doctors you listed are bad (although Tennant is not one of my personal
favorites), the ones you listed as unsuccessful are certainly not bad.
Troughton had incredible acting as the Doctor, and while McCoy wasn't
the best Doctor in terms of acting, he did a fine job and was
complemented by some of the best writing Doctor Who has ever had. Jodie
Whitaker did an alright job acting as well, she just had practically
nothing to work with since the writing and general direction of the show
during her era were so poor.
All the unsuccessful Doctor largely have different factors to why they
weren't commercially successful. Troughton suffered from having a
repetitive formula with too many BUS episodes, the solid writing of
McCoy's era was too little and too late after years of JNT's crap, and
Whitaker had to deal with horrible writing with Chibnall.
Of course, the entire premise that the height of an actor has anything
to do with the quality of their acting or their era in general is silly,
but even if we accept that premise, it just doesn't work out for Doctor Who.