Hi,
for an accurate assessment of the Stuka's performance, it's important to remember its role: It was designed as medium bomber with precision attack capability.
It was neither intended as tactical ground attack aircraft nor as strategic bomber. Instead, it was intended for an intermediate level - the operational level -, a term that was absent from the allied terminology of the time but well-established in German military doctrine.
Unlike tactical attack aircraft that were employed against frontline targets, the Stuka was seen as a weapon to strike at targets behind the front, destroying communications and decimating units on the march before they could reach the front (or before they could reform on the retreat). In modern terms, it was not meant for Close Air Support but for Battlefield Area Interdiction - a very effective concept that's part of modern NATO doctrine as well.
The decline of German military strength during WW2 saw a general trend towards tactical air support at the cost of operational or even strategic level missions. As a result, the Stuka saw combat as tactical attack aircraft, but this change was due to the pressing superiority of the Red Army on the ground, and it was an aberration from the Luftwaffe's original doctrine. (In fact, a post-war analysis conducted for the benefit of the western allies considered the switch to tactical targets to have been a major mistake of the WW2 Luftwaffe.)
What made the Stuka obsolete? In the Battle of Britain, which was fought for strategic goals, the short-ranged Stuka was out of its element anyway, and the availability of longer-ranged, heavier carrying twin-engined bombers made its use unnecessary.
However, these twins - Do 17, He 111 and Ju 88 - proved to be just as difficult to protect from the RAF fighters as the Stuka had been, and in fact, not even the "Flying Fortress" of the USAAF could survive without heavy fighter escorts later.
The new fighter bomber concept (pioneered by the Luftwaffe - fighters couldn't carry any worthwhile bomb load when the Ju 87 was designed) didn't make the Stuka obsolete, either - as long as it was possible to adequately protect the Stukas, they were the better aircraft for the job. Only when the numerical superiority or the Red Air Force became overwhelming, the Ju 87 was abandoned in favour of Fw 190 Jabos.
The Ju 87 actually carried the same bombload as the Fairey Battle (or the Bristol Blenheim), and it proved both a more survivable aircraft and a more effective weapon.
Regards,
Henning (HoHun)