I am looking for a source for this.
Someone told me that there is a story that Hashem asked Dovid hamelech not to build (continue building) the Bais Hamikdash to be able to destroy it instead of the Jewish people if they sinned (if Dovid builds it, it would be impossible to destroy it, as happened with the western wall)
I found sources for only part of the story (see below), but the part I am missing is where Hashem made the request, and that if not Hashem would need to destroy the Jews
Bottom paragraph here.
שיר השירים רבה ב׳:ט׳.
דבר אחר: או לעופר האילים לאורזליהון דאיילתא. הנה זה עומד אחר כתלנו אחר כותל מערבי של בית המקדש. למה? שנשבע לו הקדוש ברוך הוא שאינו חרב לעולם ושער הכהן ושער חולדה לא חרבו לעולם, עד שיחדשם הקדוש ברוך הוא. משגיח מן החלונות זו זכות אבות. מציץ מן החרכים זו זכות אמהות. מה אמר לי? החדש הזה לכם ראש חדשים.
שיר השירים רבה א׳:א׳.
דוד בנה את היסודות שנאמר: (דה"א כח) ויקם דוד המלך על רגליו וגו'. ושלמה בנה את העליונות שנאמר: (מלכים א ה) בנה בניתי בית זבול לך
if Dovid builds it, it whould be impossible to destroy it
God couldn't destroy it? Sounds very theologically problematic.