I've watched quite a bit from both universes and honestly there's no "best" because it really depends on what you're looking for in a movie. The Dark Knight is a masterpiece of psychological thriller filmmaking that would work in any context, not just as a superhero film - it has narrative depth and complex characters that elevate it. But Infinity War pulled off something different: making a movie that ambitious with that many characters actually work and generate genuine tension even knowing there are more films coming after.
The thing is, your colleagues probably aren't as disagreed as it seems. The Dark Knight is technically better as cinema, full stop. Infinity War is better as a shared universe experience and epic entertainment. Other films that deserve mention are ones like Logan or The Winter Soldier, which played with different genres (western/political thriller respectively) instead of just being generic "superhero movies."
My advice: instead of hunting for a definitive answer, ask yourself what kind of movie you enjoy more. Are you more hooked by deep drama with morally questionable characters, or epic scale with emotional stakes? That's your best movie right there.