In the early years, the way masters beat computers at chess was to get them out of the book as quickly as possible. After that, it was easy, since human masters could prioritize which variations they would analyze while the software had to treat all possibilities equally when analyzing. (Heh-eh! You could send programmers back then into wide-eyed fits of stammering by mentioning "nodal pruning"! I know this because I was guilty of that and similar sins!)
That's essentially what humans do in 4X games to programmed opponents, and it's much easier to do than at chess.
Suppose armor is the easiest to research, so you program the AI to go that route. Well, the human reacts and does not research guns. If you program the AI to research multiple defenses, the human goes deep in one, same with weapons.
Any 4X game of any scope has a great many opportunities for human tweaks, and a truly strong AI would be a masterful achievement, and an unlikely one as the game will sunset, unlike chess. Folk have spent their lives being chess players (Steinitz, Morphy, Capablanca, Fischer, etc.) and also simply trying to program chess. IIRC, the first chess program was in 1957 and it represented several years work. Thus, folk have been refining chess programs for well over 50 years!
Despite all the refinement in chess program software, I think that it was also the advances in computer hardware that let the chess programs get strong. The original chess programs ran on mainframe computers capable of maybe 50,000 instructions a second (kIPS) with under 100K of memory. Current consumer (not the Crays!) run at something like 70 billion instructions per second (70K MIPS) with over 100 Gig of memory!
Nonetheless, scientists and programmers of all sorts have been refining chess "AIs" for over 50 years!