I was told that there is a rule that if a word has the stress מלעיל (i.e. not on the last syllable), then the first letter of the next word should have a dagesh. I can not find anywhere where this rule applies, on the contrary, I have found the opposite, as an example:
הֵרֹ֗מּוּ מִתּוֹךְ֙ הָעֵדָ֣ה הַזֹּ֔את וַאֲכַלֶּ֥ה אֹתָ֖ם כְּרָ֑גַע וַֽיִּפְּל֖וּ עַל־פְּנֵיהֶֽם
The stress on the word הֵרֹ֗מּוּ is clearly מלעיל as shown by the trop, yet the mem of מִתּוֹךְ֙ does not have a dagesh.
וַיֹּ֨אמֶר מֹשֶׁ֜ה אֶֽל־אַהֲרֹ֗ן קַ֣ח אֶת־הַ֠מַּחְתָּ֠ה וְתֶן־עָלֶ֨יהָ אֵ֜שׁ מֵעַ֤ל הַמִּזְבֵּ֙חַ֙ וְשִׂ֣ים קְטֹ֔רֶת וְהוֹלֵ֧ךְ מְהֵרָ֛ה אֶל־הָעֵדָ֖ה וְכַפֵּ֣ר עֲלֵיהֶ֑ם כִּֽי־יָצָ֥א הַקֶּ֛צֶף מִלִּפְנֵ֥י יְהֹוָ֖ה הֵחֵ֥ל הַנָּֽגֶף
(I was wondering whether וַיִּלֹּ֜נוּ כׇּל־עֲדַ֤ת would be a good example, though it could just be because it is a בגדכפת letter after a pause)
Would anyone be able to clarify when exactly this rule does and doesn't apply?