Which ephemeral anchor script should lightning use?

When the channel counterparty does it, yes they might be able to steal HTLCs if the victim isn’t willing to fee bump high enough.

A random person indeed can’t steal funds via this attack, but they can grief the victim. They don’t need to risk much in fees either if they already have a low-priority ~1000vB transaction they want to get mined anyway. In fact we’ve already seen a similar kind of accidental pinning in the wild with expired anchor outputs. Are you sure that no one on the network will ever want to grief in this way?

A mining pool may stand to profit nicely if the victim pays 50% more in fees than they normally would. The EV depends on:

  • the probability of the pinned transaction confirming before the victim fee bumps enough to escape the pin, and
  • the percentage of hash rate controlled by the pool.

By using a keyed anchor, we can limit our exposure to such attacks to just the channel counterparty, instead of allowing anyone on the network to do it.