Here is some exciting textbook reference (Janeway 5th ed.):
Try to read Figure 8.14 and compare with text. Whereas the figure shows some presentation of antigen at the site of infection, the text elaborates on this actually happening only after (or during) movement of APCs to lymph nodes. It seems to be only there that presentation - and do not think of "priming" at this time, as the question to be answered is on presentation only, not on priming in lymph nodes. The point is that presentation does NOT happen at peripher sites of infection, so no killing there. It's a different question why there is no killing when or after priming in lymph nodes, it's a different question if the second signal next to presentation induces tolerance. On the other hand, only in the case that the assumption of no presenting at sites of infection is false, it would be relevant to know if there is a second signal (to assumed presentation at sites of infection) necessary for activation. It's not explicitely stated as it might be evident that the second signal - B7 - protects the presenter from the one he's activated and "turned(!)" to an aggressive killer, although it's named "activation" (if the t-cell would be actived towards the presenting APC there would be no activation, priming, though :-), sorry for being so "cumbersome"). Hence, your question does refer to the problem of inducing tolerance. Second signaling might activate, thus causing killing, and inducing tolerance - to be more precise and refering to your question - in respect of the activating presenting cell. "Nothing goes without saying", once again, why should activation exclude the activator? In that case, to my mind, because "activation" in lymph nodes in a first step and in timing does only refer to mitosis of t-cells, it is a licencing the t-cell to multiply and does not imply the killing that comes with differentiation only. However, the problem thus just seems to have been put on a bench.
Another reference on APCs presenting only and first time in lymph nodes would be Chen/Wang https://pubmed.ncbi.nlm.nih.gov/20636805: "..., DCs undergo a complex process of maturation into antigen-presenting cells. This happens while the DCs migrate from the periphery into the draining lymph node through the lymphatics."
In case dendritic cells did present at sites of infection, however, that should, as a matter of fact, make them prone to be killed by friendly fire which is counterintuitive. Best of all, Janeway says, without explaining, that after priming t-killer cells the B-cells as well as the macrophages "become targets" of TCLs (t8-killer-cells, it's not about the T4-helper cells targeting, to my understanding - that might even have been some reason for bringing up your question), the dendritic apcs not mentioned in that context.
You say "it can be killed by a CTL that recognizes the peptide. So in this case, the CTL does indeed kill the dendritic cell". It seems unclear (they "can") if that is a conclusion of yours or empirical knowledge.
Explaining the very mechanism of inducing self-tolerance parallels answering your question. In other words, what is so "local" about killing friendly fire in lymph nodes when setting up self-tolerance that couldn't be done at sites of infection?
There is some illustration in Roitt et al, Immunology,"Dual signaling is necessary for full t-cell activation" The B7-Receptor is not expressed constitutively, so logically, there is an option for dendrictic cells not to express the "fully activating" receptor, i.e. B7, at the site of infection - thus not being protectes in their role as priming cells.
Interestingly, "CTLA4" has been discussed here, which is in fact a ligand to B7 - a question on which side it's on. Being able to refrain from expressing B7, thus causing "anergy" and survival of the "expressor" (APC) is a decision on the side of the APC (who might not want to get killed), whereas CTLA4 as "dampening" an activation hat has been started, is on the side of the aggressorm, the cytotoxic t-cells.
Interestingly, you finish your question with asking about the exact timing and regulation. As a matter of fact, there is some event! As soon as a "clone is born" any other APC still at the site of infection and not in lymph node might rightly be killed as it may be considered as some down regulation, no need for any more clones of proliferation. Compare other answer above: it might be a matter of "growth", i.e. proliferation (cp. role of mentioned CTLA4 in cancer) and its regulation by sheer timing and amounts. (The latter seems to settle a paradoxon: no B7 yet at site of infection, so killing of friendly APCs should undergo - and it does, for the reason of down regulation).
With the B-7 receptor of APCs being termed "stimulatory", "activating" (proliferation of T-cells) it is counterintuitive to consider "anergy" as the other side of the same medal, i.e. to recognize ACPS in lymph nodes being protected in spite of their stimulating activity, leading to proliferation. Nontheless, just the opposite, non-expression of B/ leads to anergy. So my very point refers to the ending of your question: there is a point of expression of B7 in lymph nodes that turns the APC from "anergy" to "stimulation", however at the site of infection an APC not expressing, refraining from B/, just presenting antigen, would not "anergically be spared", it should be treated just like any other self-cell that's being killed by a clone of some T8-cell that has already, maybe first of all, been activated. This seems plausible within a regulation of proliferation stated above which fits into the context of CTL4 discussed in this thread.
"Anergy" (i.e. no killing of APCs) refers to t-cells (T8) that have not been primed yet. Anergy because of lack of B7 to my understanding refers to naive T-cells, it does not refer to the role of non-naive T8-cells that have been primedbefore meeting any dendritic APCs at the site of infection.
It's my speculation that at site of infection any APC that "primaturely" presents antigen does get killed by primed T-cells in a concept of self-regulation which limits the proliferation of cytotocic t-cells in the sense and direction of downregulating B7-ligands that are being discussed here.
Edited: My answer has probably been inspired by having read the question of S. Oncosuresh at researchgate at https://www.researchgate.net/post/Why-Dendritic-cell-are-not-killed-by-T-cells-when-they-present-antigen
It is the "speculative" answer by Ye Tian from the University of Chicago which I feel inclined most to: cp. "... if by then" (they will kill the DC's presenting).
You say, quote: "... and travels to the tissue, where it again finds APCs presenting the offending antigen."
After all and to sum up, it's a possibility that either the assumption that there is presentation by dendritic APCs at site of infection is wrong, or, that indeed, if there should be presentation, presenting dendritic cells in fact are being killed by t-cells that are members of a clone derived from activated t-cells which are specific for that antigen - as they are not needed for activation which is "priming" that had already, earlier, in time, been undertaken, as the presence of non anergic t-cells at site of infection shows.
As an answer, I'd prefer the second alternativ based on the empirical assumption that there is presentation of antigen by APC already at site of infection which might not be known yet.