It seems to me that interfering in a foreign election should be understood to be grounds for war.

Russia and China are definitely interfering in the US (to spread discord, ex https://en.wikipedia.org/wiki/Chinese_interference_in_the_20...), so should the US formally declare war against them?

What I do think is that nations should 1) interfere back, and 2) make their citizens more resilient to foreign propaganda. And I specifically don't mean building a firewall. In fact do the opposite: if a firewalled nation is leaking out propaganda, ensure firewall-breaking tools leak in.