(י) וְאֵ֤ת כׇּל־עָרֵיהֶם֙ בְּמ֣וֹשְׁבֹתָ֔ם וְאֵ֖ת כׇּל־טִֽירֹתָ֑ם שָׂרְפ֖וּ בָּאֵֽשׁ׃
(10) And they destroyed by fire all the edifices in which they were settled, and their encampments.
(א)טירתם. מְקוֹם נוֹטִירִין שֶׁלָּהֶם, שֶׁהוּא לְשׁוֹן מוֹשַׁב כּוּמָרִים יוֹדְעֵי חֻקֵּיהֶם;
דָּ"אַ — לְשׁוֹן מוֹשַׁב שָׂרֵיהֶם, כְּמוֹ שֶׁמְּתֻרְגָּם "סַרְנֵי פְלִשְׁתִּים" (שמואל א ו') — טוּרְנֵי פְלִשְׁתָּאֵי:
(1) טירתם means the place of their scribes — a term which is denoting the dwelling-place of their priests, those well acquainted with their laws.
Another explanation is that it means the dwelling-place of their princes, just as “the lords of the Philistines” (I Samuel 6:4) is translated in the Targum by “the טורני of the Philistines” (Sifrei Bamidbar 157:5).
(י) וְיָת כָּל קִרְוֵיהוֹן בְּמוֹתְבָנֵיהוֹן וְיָת כָּל בֵּית סִגְדַתְהוֹן אוֹקִידוּ בְּנוּרָא:
(10) All their residential cities and houses of worship they set on fire.
Nefesh HaGer posits that Onkelos seems to be interpreting this word according to Rashi's first explanation that it refers to clergymen, because Onkelos also associates this term with matters related to worship.

Although it isn't explicit in Rashi, Nefesh HaGer is understanding that word "kumrim" relates to the scribes' role of religious supervisor and by extension their judicial role in society.
I think there is precedent to this from another place in Chumash, based on Onkelos.
(כב) רַ֛ק אַדְמַ֥ת הַכֹּהֲנִ֖ים לֹ֣א קָנָ֑ה כִּי֩ חֹ֨ק לַכֹּהֲנִ֜ים מֵאֵ֣ת פַּרְעֹ֗ה וְאָֽכְל֤וּ אֶת־חֻקָּם֙ אֲשֶׁ֨ר נָתַ֤ן לָהֶם֙ פַּרְעֹ֔ה עַל־כֵּ֕ן לֹ֥א מָכְר֖וּ אֶת־אַדְמָתָֽם׃
(22) Only the land of the priests he did not take over, for the priests had an allotment from Pharaoh, and they lived off the allotment which Pharaoh had made to them; therefore they did not sell their land.
(כב) לְחוֹד אַרְעָא דְכֻמָּרַיָּא לָא זַבִּין אֲרֵי חֳלָקָא לְכֻמָּרַיָּא מִלְּוַת פַּרְעֹה וְאָכְלִין יָת חֳלָקְהוֹן דִּיהַב לְהוֹן פַּרְעֹה עַל כֵּן לָא זַבִּינוּ יָת אַרְעֲהוֹן:
(22) But the land of the priests he did not buy, because the priests had an allotment from Pharaoh. They ate the allotment that Pharaoh gave them, and therefore they did not sell their land.
(א)רק אדמת הכהנים השרים כמו כהן מדין. לא קנה פן יתגרו במלך. ד״א לפי שדנוהו לזכות כמו שפי׳ למעלה גבי ויתנהו אל בית הסהר.
(1) רק אדמת הכהנים, “only the soil belonging to the priests (Joseph did not transfer to Pharaoh).” The priests are the like the ministers, as the כהן מדין the priest of Midyan. Joseph did not transfer to Pharaoh so they would not have any reason to start a rebellion against Pharaoh. A different reason given for Joseph’s preferential treatment of the priests is as we explained already, that the priests had suggested a method by which to test if Joseph or the wife of Potiphar had spoken the truth, as a result of which, Joseph instead of being hanged had only been put in jail.
We see here that the Kohanim/religious clergymen who are referred to as "kumrim" by Onkelos, were also involved in judicial matters (as Chizkuni brings from the Medrash).
This matches the Nefesh HaGer's assertion to connect "kumrim"/lawmakers as Rashi interprets the passuk, to be in line with Onkelos who says it refers to houses of worship, since seemingly these two roles were usually fulfilled by the same people, namely the kumrim/clergymen.
--
The job description of the priests is also seen in the Gemara in Avoda Zara....
אֲמַרוּ לֵיהּ: וּמַאי טַעְמָא לָא אָתֵית לְבֵי אֲבִידָן? אֲמַר לְהוּ: זָקֵן הָיִיתִי וּמִתְיָירֵא אֲנִי שֶׁמָּא תִּרְמְסוּנִי בְּרַגְלֵיכֶם. [אֲמַרוּ]: וְעַד הָאִידָּנָא כַּמָּה סָבֵי אִיתְרְמוּס? אִתְרְחִישׁ נִיסָּא, הַהוּא יוֹמָא אִירְמַס חַד סָבָא.
The Romans said to him: And what is the reason that you did not come to the house of Abidan? This was a gathering place where debates on wisdom and faith were conducted. Rabbi Elazar ben Peratasaid to them: I was old and feared that perhaps I would be trampled under your feet, due to the huge crowds. The Romans said: And until now, how many elders have been trampled there, that you would be worried about such a possibility? The Gemara comments: A miracle occurred, and on that day, one old man was trampled.
See also Onkelos Parshas CHukas..........