I have been to Berlin several times, starting in 1967 when the wall was fairly new and it was a divided city. It was wonderful to return in 1994 and again in 2015;and see how different it was. Since it is important to you, it doesn’t matter that it is a bit out of the way.
For a June trip, I suggest you put Switzerland last, for weather reasons. Mountain weather ( Berner Oberland) can be iffy through June, in our experience, while I have had great weather in Berlin as early as May.
So a rough itinerary would be fly into Munich as you propose; visit Salzburg and Fussen and whatever else you wish to see, then head up to Berlin. This is a long enough journey that we chose to break it up with an overnight in Bamberg in between. I recommend that, unless you prefer another intermediate stop.
After Berlin, it makes sense to head to Switzerland via Freiburg. You should plan another intermediate stop; it is a 9-hour journey by direct train between the two, but that would be too long for us. Köln would be nice but is a bit out of the way to the west. Frankfurt is right on the path of direct trains, but may not be of interest. You can use the bahn.de website to see the towns that are right on the direct route, as well as figure out detours that might be worthwhile. Hopefully others will have good ideas to offer, as I am not familiar with that part of Germany at all.
We just visited Freiburg 2 months ago on our way from Frankfurt to Switzerland and really enjoyed our time there. It was our arrival night in Europe so a bit fatigued, but we liked walking around the old town area and were impressed that the main town square was ringed with restaurants filled with locals enjoying a summer evening. We plan to return, as It seems like a good base for a longer visit. And a convenient gateway to Switzerland, with direct trains to Basel. From Basel you could make your loop, down to the Berner Oberland and then to Luzern via the scenic Brunig Pass route. As you already know, you can spend your final night in Luzern and easily reach the Zurich airport for your flight home the next day.
It sounds like a great trip.