Wiki says that the critical altitude of the "E" was around 12000 ft.
And interestingly enough, soviet P-40 drivers say that it was indeed a match for Bf-109s until the later stages of the war.
A lot of Bf-109 F/G drivers found that out the hard way by getting into a turning fight with a P-40.
You are correct that the critical altitude for a P-40E is around 12,000 ft which is to say that is where the engine can generate max power for that altitude. It is due to the Allison Engine with a single stage supercharger. The Merlin versions (P-40F and P40L) had a critical altitude of around 20,000 ft.
The P-40 service altitude is actually around 29,000 ft. I would not try to dog fight at that altitude. All you can do is dive.
The Allision P-40s were optimized to operate from 11,000 ft to around 16,000 ft. Unfortunately, the air war in Europe and the Med was from 10,000 ft up to 26,000 ft. P-40 drivers oftentimes had to withstand an ambush attack from somebody higher up. If they survived the initial attack, they could out turn and outdive just about anything. (Note: the exception is the Japanese Zero, which could out turn almost anything at speeds under 150 mph.)
Reading the history of the airwar in the Med, the Allied solution was to put up some Spitfire Vc's , IX's or VIII's at much higher altitudes to take care of any would be attackers. That changed everything.