AI can be actually pretty clever compared to average human, it can see and tries to exploit weaknessess, even on strategic levels. In my last Italy game I saw the British do amphibious invasions of poorly defended areas and paradrops on undefended islands (Crete, Cyprus), after breaking through their lines Greeks even evacuated almost all their remaining troops to Crete and it was pretty hard to capture it with 10 full divisions guarding it (of course capitol was moved there so no supply shortages). And later when Crete rebelled (did not garrison it, my bad), US even paradropped reinforcements there. While I was distracted by these events and Barbarossa in full swing, UK tried to open the Med by doing simultaneous invasions of North Africa and Arabian Peninsula (storming with MAR and exploiting with MOT), later trying to storm the Gibraltar, which failed because I was ready there.
On the other hand, when UK defended, Gibraltar fell too easily, AI should put higher priority on it. Generally, AI is better at attacking than defending, usually because of lack of foresight (of course you should have reserves ready to defend strategic locations like Gibraltar and Suez, but maybe the AI thought "I have bigger navy than Italy, no worry" just like an inexperienced human would think) and players taking advantage of game design while AI is hardcoded to do certain things, like sending small fleets around Sicily so I can defeat them piecemeal with my deathstacks.
The thing is, AI is not meant to be the godly unbeatable adversary, but a fun challenge but ultimately beatable for 95% of players. That it looks stupid to 5% of players that have hundreds or thousands of hours into the game is only inevitable, those players would beat the average HOI player as easily as the AI, especially when they know exactly when and how the war will unfold and what makes the AI "tick", because otherwise other people would complain if it was too ahistorical. Of course there are weak areas, like choosing the right army composition and using it for its intended purpose (like using arm/mot to create pockets instead of trying to do it with leg inf) or better reaction to new threats (it tends to either overreact or react too late, but to be honest, humans often do that too when surprised). And priorities - do not pull troops from the defense of Moscow because the front in Caucasus is not fully manned north/south, just cut the losses and defend the much shorter horizontal line. To be fair, it almost cut my troops in Caucasus and was only stopped because of lack of troops, and historically if the Italians completely manned the southern front and do as well as the Germans did there (as I did in my game) freeing german troops for the central and northern fronts, historically USSR would probably lose the war too.
To sum it up, I think the biggest reason why AI sucks is game design, if HOI4 will be designed in such a way that ahistorical builds will not be completely overpowered compared to roughly historical ones that will go a long way to help the AI stand a chance. Also, when AI makes a mistake, try to think "Could a human make a similar mistake?" instead of "AI made a mistake, it is stupid!". Because if you have only one AI (the devs said they will not make different ones for different difficulties), making an AI that makes no mistakes is even worse game design than making a stupid one. Because the AI is there to make the game fun, not to beat you senseless repeatedly. It is also pretty historical, everyone made mistakes in war, and some mistakes were really huge which even HOI3 AI would not do.