Both are for the sake of Kavod Shamayim, and both gave loads of Bizyonos to the realm of Tum'ah, Dovid was M'vazeh Golyas plenty, and Pinchos was M'vazeh Zimri. Chazal say that Pinchos noticed that the “lions” (Shevet Yehuda and Shevet Don) weren't doing anything, so he rose to the occasion. Also, by Golyas it was actually Shaul who should have met the challenge of Golyas.
And since Shaul didn't, Dovid took over. So again, we have them both very similar, since they took over in place of others. When Moshiach comes, we will see two great people from the past: Eliyahu who is Pinchos, and Moshiach, who is either Ben Dovid (Rambam) or Dovid himself (as we say in the Tefila of Hoshana Rabba). It is also well known that before Moshiach comes there will be extreme difficulty with Middas HaYesod.
Even in prewar Europe, the streets were never so depraved as they are today, despite the constant major decline in Yiddishkeit. And despite all the terrible K’fira, with wicked Jewish communists, Zionists, Yiddishists, and Bundists, etc., Rachmana Litzlan, yet, the brazenness of our streets was unheard of.
R' Chaim Halperin Zatzal told me that a year before the Nazis, Y'mach Sh'mam, attacked Poland, the streets had just begun to be similar to our Matzav today. When R' Nissan Potashinsky Zatzal (who was R' Gershon Liebman's Rebbe) noticed it, he gave a Shmuess in Bialystok (Novardok) and said: "We'll be paying for this". Right afterwards, WWII broke out.
