Also there's "distance running" as in running maybe 50k a week, that's probably okay, although as you get older it will increase your risk of stroke. But ultramarathons are a whole different ball game and almost certainly bad for you
https://pmc.ncbi.nlm.nih.gov/articles/PMC11720530/ says there's a higher rate of AF in older, male althetes but a lower risk of stroke compared to similar aged, non-athletes.
At any rate, the data doesn't seem clear enough to claim that "distance running bad for you" or "any distance over 50K is bad for you".
I think the biggest risk though is acutely doing high intensity exercise (e.g. a marathon) whereas doing low intensity regular exercise (e.g. a 5k jogged at moderate pace 4x a week) is probably good.
So it's not "running is bad", it's more "running insane distances and/or running at insanely high intensity is bad", but the issue is a lot of people who get really into running end up doing one or both of those things.
One sign that marathons (let alone ultramarathons) may not be particularly healthy is that the first guy to do one famously died, and then subsequently people die doing them every single year. Yes the risk is low overall, but that doesn't mean it's actually good for you