I think you're looking for the kind of precision that just doesn't exist in the legal system. It will almost certainly hinge on intent and the extent to which your actions actually stifle legitimate speech.
I imagine that getting rid of spam wouldn't meet the bar, and neither would enforcing that conversations are on-topic. But if you're removing and demoting posts because they express views you disagree with, you're implicitly endorsing the opinions expressed in the posts you allow to stay up, and therefore are exercising editorial control.
I think the lesson here is: either keep your communities small so that you can comfortably reason about the content that's up there, or don't play the thought police. The only weird aspect of this is that you have courts saying one thing, but then the government breathing down your neck and demanding that you go after misinformation.