- cruise the Rhine or Mosel river for a short trip
- spend a day in/near Heidelburg
- hike or bike somewhere?
- maybe a day trip into Frankfurt to the old town if it's worth it for a once in a lifetime trip to Germany?
Mainz is a nice place - but if you are coming from Belgium and want some hiking/biking/cruising, old-world villages - and some genuine medieval castles - there's no better place than the Middle Rhine Valley to the north of Mainz and just south of Koblenz. Boppard is a good Rhine base for train travelers, especially if you want Mosel River options (like Cochem or Burg Eltz.) St. Goar might be a slightly better base if you won't be going to the Mosel (there's a very handy ferry crossing in St. Goar for train users.)
Both Boppard and St. Goar are good places to end a river cruise (which ideally begins in Bingen if you want to cruise the best scenery.) With a base in one or the other, you can easily reach Bingen by train to start your cruise, and you can easily visit the other two old-world towns of interest here, Bacharach and Oberwesel (just a few minutes south of St. Goar on the same train line.) St. Goar is home to Rheinfels Castle, and you can reach Marksburg Castle (in Braubach) from either Boppard or St. Goar.
Hiking south from St. Goar to Oberwesel on the Rhine Castle trail is a real joy:
https://www.romantic-germany.info/things-to-do/hiking/long-distance-hiking-trails/rheinburgenweg-trail/
The thing about the Rhine/Mosel is it's spread out, and cruising, hiking and biking requires a little time if you also want to snoop around some fine old-world towns. You can't really do it all on just a day trip from Mainz.
You have 4 nights... I would probably book 3 nights in Boppard or St. Goar - then get an early start on Day 4 and do your sightseeing in Mainz. Leave your bags at the station that morning - then fetch them in the afternoon and take a pm train to Heidelberg for the night. The following day, visit Heidelberg prior to catching your train to Munich. You can leave H'berg around 16:00 and still make it to Munich for dinner. The 16:03 leaves Heidelberg for Mannheim where you have your only change of train - you reach Munich at 17:28. These are just suggestions that look good to me - there are plenty of other train options throughout the day.