I have no horse in this race. As my signature says, I have lots of lenses (and even more if you count lenses I used to have but sold). I've only ever had one 3rd party lens, a Rokinon 14/2.8 (technically, I've had two of them but the first one was optically defective so I exchanged it).
I know there were many 3rd party EF lenses sold, I don't know how much of an impact that had on Canon's EF/EF-S sales. Would people who bought a Sigma/Tamron 17-50/2.8 lens bought the more expensive EF-S 17-55/2.8 if the 3rd party options weren't available, or would they have just stuck with the 18-55 kit lens? My guess is that the 3rd party lenses didn't have a huge negative impact on Canon's sales.
Some have argued that readily available 3rd party lenses for the RF mount would increase R body sales. Again, not sure it would make much difference. Canon has already become the #1 MILC brand without 3rd party AF lenses for the RF mount.
The cost of Canon to support bodies having compatibility problems with 3rd party lenses is something I hadn't really considered, but it makes sense that it's significant, and probably more than offsets (in a bad way) any additional sales they would get from facilitating 3rd party lenses.
It does make sense that the threat of legal action from Canon is sufficient to cause a 3rd party vendor to avoid making RF mount lenses. Even if they believe they'd ultimately win, there are a lot of jurisdictions that battle would need to be fought in, and it would not be cheap.