The character writing is a particular strength it has over many of the others. Not only are all the character actions well done, but some specific character arcs are excellent payoffs for previous set up such as Tony's awareness of the threat Thanos poses and the tragedy in not being able to stop him despite the strengthening of his desire to protect what matters to him after the events of Civil War, Vision's ideas on his existence and self-worth, Thor's feelings of failure in upholding his duties as protector of Asgard, etc. and, of course, Thanos being the best villain in the MCU by a wide margin. The darker turn for the ending also stands out compared to many others in the MCU (even if it ultimately had little more lasting consequences than something such as the character deaths in the Piccolo Daimao Arc).
As for what brings Civil War above it, internal consistency is the main factor. Infinity War has a few issues as how certain powers are utilised (why didn't Dr. Strange use the open-close portal strategy Wong used to cut Cull's arm off in order to try and kill Thanos? Why didn't Thanos spam the reality stone to easily crush the adversaries he was less respectful of? etc.), some powerscaling issues (Wanda is suddenly so powerful that she can destroy an ancient artefact birthed by the Big Bang? The same Steve that was equal to a weaker suit of Tony's than the Bleeding Edge model can put up a struggle against the guy who tooled Hulk?) as well as the Wanda-Vision romance being pretty rushed when considering there was at most a spark between them in Civil War, whereas Civil War is fairly bulletproof in its writing.