IB 138 then LH 1803 at Madrid
Quito → Madrid → Munich
Timetable, Madrid time
17:20IB 138 from Quito at the gate
14:45LH 1803 to Munich leaves the gate
21 h 25 apart on the timetable, overnight
LH 1803 leaves 21 h 25 after IB 138 arrives on the timetable: more than half a day, so not a connection we count.