Going to Prague from Munich requires multiple transfers depending on the departure. Two departures ca noon and 2 pm are straight shots. I suggest taking one of them, you'll still arrive at a decent hour. I don't like changing trains especially with luggage in tow.
Prague to Dresden is ca, 2 hrs,, about half way to Berlin. On returning to Munich from Dresden, there are departures where you need to transfer in Leipzig anyway, then on Munich.
There is also a night train Dresden Hbf to Munich Hbf changing in Berlin Südkreuz, not Berlin Hbf (central station), if you want to consider that option. That would give you an extra day in Dresden. I have no problems taking night trains as long as the transfer time is still decent., not at say 2 am or 3 am , which I see Germans do.
Time-wise your itinerary is very doable. I would have no problem with it.