Eventually we'll have equipment on Mars that we want to function for a long duration, and we'll need to solve that problem, but for InSight (and others) death by dust was by design.
It costs money to operate these probes with a whole staff here on earth monitoring, commanding and analyzing the data that we receive. After some time you get diminishing returns on how much you can learn from the same probe, and would be better off paying these people to work on a new probe (improved using what you have learned) or even an identical probe, deployed elsewhere on the planet.
When these missions are designed that is taken into consideration to determine the desired lifespan of the mission, and the probe is designed to that lifespan (with some margin). Spending money (or worse mass) to make a component survive well beyond that lifespan would be a waste, and could cut into the (fiscal or mass) budget resulting in tradeoffs that make the probe less capable during the lifespan it has.
Insight was designed to operate for at least two years with margin. It has hit the limits of that margin after four years and it's time to shut it down.
It's all true, but times are changing. Soon it will be cheaper, as lift cost drops, to just send a thousand cheap, heavier probes towards mars... than one super engineered probe.
But with a thousand probes you still might not care about dusting the panels off. It all depends on how long you need the probes to last. Mass savings will still be important, in the same way material costs become more important when mass-producing something than when making a one-off.
The sweeper arm idea is better for panels on Earth due to humidity: https://news.mit.edu/2022/solar-panels-dust-magnets-0311 Electrostatic based solutions using a layer called an electrodynamic screen that was introduced in the early 1970s using interdigitated electrodes has potential for moistureless environments like Mars. But, the development cost for ad hoc Mars application is a high barrier.
Motorcycle racers use "tear aways" on their helmet visors. Thin plastic sheets that they can tear off and throw away when the visor gets too dirty.
(Not sure I'd want to deploy a system that intentionally litters single use plastics onto pristine planets though. We're already the species who spent way too long tossing old-fashioned non-biodegradable styrofoam cheeseburger containers out of 1967 Cadillac Eldorado Convertibles with whale-skin hubcaps getting 1mpg doing 110mph down the freeway...)
Might be able to use something like a toner transfer belt/blanket in a laser printer, with brushes and/or electrostatics to clean the belt as it cycles in a loop.
I'm sure it's not that simple, but I suspect that it simply isn't worth it to launch extra mass to Mars. InSight was successful in its mission, I don't know what value would be gained from extending its life further.
I always want to bike-shed this problem so bad. Brushes, electrostatic cleaners, vibrators, vortex generators, reel-to-reel plastic film over the panels...
There are so many things that seem like they would work but I know it's only because I don't understand the tradeoffs. In space tech, everything comes with a catch.
Perseverance uses an RTG (radioisotope thermal generator) and does not have solar panels.
And, as mentioned, you don't want the helicopter flying anywhere near the rover for fear it would collide and damage the rover.
Also, not really ironically, the helicopter's own solar panels (which sit above the rotor blades) are collecting dust, and that plus the lower sunlight during this part of the Martian year have significantly reduced power levels. They have had to implement measures to reduce power consumption, which will reduce the operating life of the internal batteries. It is possible we won't see any more flights, not sure yet.
It costs money to operate these probes with a whole staff here on earth monitoring, commanding and analyzing the data that we receive. After some time you get diminishing returns on how much you can learn from the same probe, and would be better off paying these people to work on a new probe (improved using what you have learned) or even an identical probe, deployed elsewhere on the planet.
When these missions are designed that is taken into consideration to determine the desired lifespan of the mission, and the probe is designed to that lifespan (with some margin). Spending money (or worse mass) to make a component survive well beyond that lifespan would be a waste, and could cut into the (fiscal or mass) budget resulting in tradeoffs that make the probe less capable during the lifespan it has.
Insight was designed to operate for at least two years with margin. It has hit the limits of that margin after four years and it's time to shut it down.