Greatness isn't about who's the best player. The best player in history is either Kasparov or Carlsen.
Philidor was the best player in the world for about 40 years. He literally wrote the book on how to play the game, and taught generations how to play positional chess.
Yes, Philidor deserves to be second.
Fischer COULD have been the greatest, but as you admit, he retired from chess rather than become the greatest.
Karpov and Fischer are just about tied in my mind. I could easily have reversed those two. Karpov's accomplishments as World Champion were unrivalled until Kasparov came along. Fischer played only one world championship match, and no serious games from 1972-1992. Capablanca is definitely one of the greatest players ever. But consider the arguments for each of those above him. To me, they all have slightly better credentials as greatest ever. Alekhine put a HUGE dent in the Capa myth.
"Philidor second? Are you kidding? Fischer could have beaten Philidor blindfolded. lol"
I don't remember who it was that said that Philidor was the strongest player in the world with a margin of 200 Elo for 50 years, but I think it was Larsen that ranked him as the greatest ever.