I believe in Schengen you always clear customs at your final destination. If we apply that to your situation, you will not pass a customs check as long as you stay airside in MUC (you will have to clear immigration though) and your baggage stays in transit. If you happen to leave the airport during the layover your hand luggage will be subject to inspection. In FRA your bags will stay in transit and you will board normally so no check there, again unless you leave the airside area for some reason.
I did however read something recently on one of these threads that sometimes there are some customs checkpoints airside which check just your hand luggage, but that these are never staffed. Maybe someone else can confirm that one though...