Afghanistan/Taliban didn't have a functional air defence network nor where they technologically near-peer.
The A10 is amazing for CAS in that environment but against anyone tooled up by the russians/chinese with modern SAM's it'd be a different picture.
Now..whether the USAF needs both given that everything they've done for most of the last 40 years has been that type of air support is an interesting question, they like to have high tech toys which is why the A29 isn't apparently going anywhere.
Air superiority doesn't mean that ground-based air defenses are all eliminated, or even that the enemy's air force is completely defeated. Nor is there any guarantee that air superiority will be gained quickly. In WW2, the allies didn't achieve air superiority until early 1944, and while by D-Day they outnumbered the Luftwaffe 10:1, they still lost 10% of their aircraft between June 6th and June 30th. The Luftwaffe was still shooting allied planes down as late as May 8, 1945.
In a modern conflict, CAS aircraft like the A10 would be vulnerable to MANPADs, AA guns, and SAMs which could all be hidden for extended periods of time in bunkers and caves, and would continue to be produced by peer adversaries for pretty much the entirety of the war. Even late in the war, manned CAS would require fighter escort, which effectively limits their dwell time and availability to that of the fighters. By the time the CAS can really do their thing, the war is essentially already won.
Which near peer would that be? The US military industrial complex is gearing up for a conflict with China to control Western Pacific islands, where any CAS will have to be provided by carrier aircraft or long-range land based bombers. The A-10 can't even get there.
The A10 is amazing for CAS in that environment but against anyone tooled up by the russians/chinese with modern SAM's it'd be a different picture.
Now..whether the USAF needs both given that everything they've done for most of the last 40 years has been that type of air support is an interesting question, they like to have high tech toys which is why the A29 isn't apparently going anywhere.