First of all, each of the Mario bros have very lackluster recoveries, Doc's being one of the worst in the game. Mario's is slightly better due to his cape's longer off stage distance. Luigi has a very predictable recovery but a good Luigi will stall/use mind games with his up-B.
Luigi and Mario are considered closer together in terms of tiers, while Doc is generally a few ranks higher. This is due to a number of factors. Doc's punish game is very solid. He has one of the best projectiles in the game. His cape is amazing for edge guarding because it reaches beneath the stage. Downsmash is brutal, F-air is great and kills at 120% - these are better tools than Mario has in his inventory. Luigi has his f-air and ridiculous wavedash, the latter of which is very effective against most opponents when used well.
Doc is very fun. Yes, his recovery is bad but pill spamming while off ledge helps this SO much. You also have tons of available Shroomed (best Doc in the world) videos playing Doc at a high level against other smash gods.
Mario is just a worse version of Doc. Projectile a bit worse, punish game slightly worse, recovery slightly better, and smashes as an average across the board are not as good, whether it be less damage or a less effective trajectory. (Some of mario's moves are better but this is on average).
Finally, if you like wavedashing then you might like Luigi. He has the longest in the game and with enough practice and skill you will be able to have better control over the ground game. His down smash combos easily into other smashes ie down smash or forward air. I think Luigi is great fun but against top tier characters I feel that he is at a severe disadvantage due to his terrible weight and predictable recovery.
So tldr; Doc is considered "the best" but not by a landslide. Like he said, pick the one that fits your playstyle. For me, Doc was a no brainer. His combos, style, and punish game are what did it for me. Plus who doesn't love a Doc main?