Algorithms are moulding and shaping our politics. Here’s how to avoid being gamed