That is a LOT of driving, in traffic. You're going to have to drive into or very close to Boston that day. It sounds overly ambitious, and exhausting.
I would skip Salem and maybe even stay somewhere slightly South of Boston until you leave for Maine. You can visit Salem when you bring your daughter to college
.
Then I'd even skip Malden and head for Wellington in Medford. More parking.
I was thinking about their staying somewhere near Newton/Waltham on Rt128(95). They could easily hop on the Green Line (Riverside stop) to go into Boston; shoot up 128N > 95 to go to Maine (which is a long ride!); and shoot right down 128/95 to get to Gillette Stadium. Either Newton or Waltham would be a good central location for all of these things. You would also avoid driving in Boston this way, but you would have to drive on 128/95 which isn't too, too bad.
Green Line Riverside Station:
https://en.m.wikipedia.org/wiki/Riverside_station_(MBTA)
One hotel in the area of Riverside @128/95
- Hotel Indigo Newton Riverside
Walk to Riverside Green Line station
More, perhaps better hotels a little further north in Waltham on 128/95
- The Westin Waltham Boston
- Embassy Suites by Hilton Boston Waltham
- Best Western Plus Waltham/Boston
- Hampton Inn and Suites Boston/Waltham
Drive to Riverside Green Line station
Personally, I think staying right in Boston would be best, but since you have these things you want to do while here, I think this might be your best solution. It is a relatively safe area, too.
Let me see if I can do a map of some sort for you.