One of the things that is supposed to make the F-35 as capable as an A-10 in CAS/COIN (counter-insurgency, despite the wildly different approach, is it's "Sensor Fusion" system. Basically it gives the pilot so much information that it offsets the "fast-mover" disadvantages (and then some). Whether it lives up to the claim is no something I can comment on.
Of course, when it comes to recent wars, everything the US military uses is massive overkill and massively expensive (apart from drones, maybe).
The https://en.wikipedia.org/wiki/Light_Attack/Armed_Reconnaissa... is supposed to be the "cheap COIN" aircraft for these kinds of conflicts.
There is a popular view held that the Airforce brass doesn't like CAS/COIN (They all about killing MiGs) and that prop planes aren't sexy enough which is why this program has been taking so long.