The A-10 has to fly 2 miles from its intended target.
Short range SAMs, MANPADs and AAA are the threat.
F-35 will never get within range of any of them.
Shrapnel from SBDs do not distinguish between friend an foe when yards separate the two.
A-10s fly less then 100 feet on many strafing runs. The 35 release a few SBDs some of which miss the scattered troops firing on friendlies, then what? Home to reload or expend its few gun rounds, trying to hit the rest to the enemy?
The 35 is a bomb truck trying to be a fighter and do CAS, neither of which is its intended role. They will not last long in situations like Afghan where they will either succumb to ground fire or fail to protect friendlies, and less time against swarms of J-10s & J-20s
Your mileage may very, but I’ll take A-10s for CAS over 35s all day long.