Elections are easier to solve technically. No mail in ballots. Require state ID in person at the voting center. But that's a different topic that can get divisive, long and derailed very quickly.
Only if you're fine with disenfranchising voters. In which case, securing elections is the easiest thing in the world: I vote and nobody else does. It's securing elections while not disenfranchising voters that's the hard part.
And how exactly is that a bigger problem than fraudulent votes? And how could you possibly solve it outside of segmenting the country's internet to prevent foreign ISP routes?
Because fraudulent votes in most developed counties are a complete non issue while people getting psyopped by troll farms and AI is monumental.
And yes, I think we likely will see social media become segmented so hostile nations will be blocked from posting on local social media. Or at least having them flagged as foreign accounts.