Prior travel experience and thinking ahead (particularly about what could go wrong and where - Murphy's law stuff) had made the OP's trip a success, coupled with some help from LH and the agent in MUC.
Now I know it is possible to connect in MUC in 5, if your connecting flight is at the next gate. But will I plan it, no way!