I'm going to be typing this, accepting that different places, different theaters, different circumstances can make a difference.
The engine from the Ki-61 was a license built DB 601, which was no longer in mass production in it's native Germany by the time the Ki-61 entered service in numbers. It had been replaced by the DB 605, which was an uprated, increased displacement version of the 601 design. The DB 601 version that the Ha-40 was based on was basically a Battle of Britain/post BOB version of the 601, which Alfa Romeo built under license for the MC 202 (Macchi used a mix of imported and licensed engines, which the trickle of imports of the former and slow production of the latter meant that the radial engined MC 200 was produced alongside the 202 until 1942 I believe). At least Kawasaki didn't have that issue. But anyways, the Ha-40 was still and evolution behind the late 601s and certainly the 605s, even with the early restrictions they had.
Of course, when facing mostly P-40s (that were equally as fast), this wasn't a major concern. Of course, the Ha-40s durability issues were a much bigger problem, mostly crank failures/early wear due to bearing issues. Since the 601s didn't really have those problems, you have to wonder about the metallurgy that Kawasaki used or was stuck with. This wasn't a smarts or talent problem, it was a tech problem. And it wasn't fixed when the Ha-140 version of the Ha-40 was developed for the Mk II version of the Ki-61. This was intended as a high altitude interceptor, one of the few really good high alt planes that the IJA would've had if the engines weren't so bad in terms of reliability. Those issues and USAAF bombing of Kawasaki's main engine factory crippling production is what brought about the Ki-100 conversion of the Ki-61 to use the Mitsubishi Ha-112 Kinsei engine.
As far as the P-40, it was OK in 1943 in low alt theaters (MTO and Pacific), though it was growing increasingly obsolescent given American, British and German/Italian developments. Of course, on paper the Ki-44 and Ki-84 should've run circles around the P-40, but that didn't pan out in the CBI. Granted, tactics and pilot skill probably played a hand in that as well.
But I do have to ask this, and it's just like in auto racing where there's discussion about driver vs car vs both as far as dominance. I suggest, though an isolated incident, the action where Maj. Bill Shomo won his Medal of Honor in early 1945 over the Philippines. Shomo and his wing man were flying F-6D Mustangs (tactical recon versions of the P-51D) when the encountered 13 Japanese planes. 11 were Ki-61s, one was a Ki-44, and a G4M. Shomo shot down 7, his wingman shot down 3, and the other three Japanese planes managed to escape. Interestingly, Shomo shot down 8 planes, including the 7 in that one engagement. However, though he enlisted in the USAAF in 1941, and had flown missions (tactical fighter recon) dating back to 1942, Shomo himself claims to only have seen less than 15 aircraft in his missions (the first, and his first kill, was a D3A in Dec. 1944).
Point here is was it the planes, the pilots, or both? The P-51D certainly performed better at this stage of the war than the Ki-61 or Ki-44, but especially the Ki-61 still should've been a formidable dogfighter, especially at lower speeds, in the right hands. And Shomo and his wingman showed clearly better airmanship than their opponents, who outnumbered them almost 7 to 1, 6 to 1 if you discount the Betty. Of course, by early 1945, the IJA and IJN were starting to scrape the barrel for pilots, while the Allies were essentially in their prime.
But back on subject. IMO, I do believe that both the Japanese, and even the Allies until later in 1943 and into 1944, were a step behind what was going on in the ETO. That was universal until the USN got Hellcats and Corsairs in numbers, the USAAF until they got P-38s and P-47s (and later P-51s, namely the Merlin variants), and the RAF/Commonwealth with the Spitfire VIII.
I do think a lot of this had to do with the "defeat Germany if possible first" mindset, and that it was known that Germany was working on some wicked stuff (hence probably part of the urgency vs Japan to defeat them). And of course, Japan, being relatively new to industrialization (Japan and much of eastern Asia were about 50-75 years behind Europe and North America to the Industrial Revolution, and were also up to that point heavily isolated from much of the rest of the world) meant the assumption (not 100% unfounded) that they might not keep up with Germany due to industrial infrastructure and technology. Not the smarts of the people involved. How much of this was routed in fact/intelligence, vs predjudice or ignorance, I don't know. We can look back with our hindsight being 20/20, however.
OK, long-winded basic impressions over. And I do also find it interesting how frank Admiral Yamamoto reportedly was when he gave an almost fatalistic assessment that Japan could run wild for about 6 months, but after that, all bets were off for Japan. And how said prediction aligned with Japan's defeat at Midway.