Aizen was a better conspirator, but he's an incredibly lackluster military tactician. His "genius" plan of defeating the Soul Society involved wiping out half of his army, just to trap four captains in Las Noches. He was exposed heavily during the Deicide arc, which revealed just how much of a spoiled brat he really is.
By contrast, Yhwach managed to outwit Yamamoto himself, tricking the dude into using up his Bankai on a decoy, stealing Ryujin Jakka and killing him for good. I'd say Yhwach was ultimately smarter. Aizen needs everything to go his way in order to succeed, which was only possible during the Soul Society arc.