Your travel would count as two days. According to the 7 PM rule, your travel on the night train will count for the arrival day.
Trains
If you board one or more trains that depart after 7 p.m. (19:00) and arrive at their final stop
after 4 a.m. (04:00) then only the day of arrival needs to be entered into the travel calendar.
www.eurail.com/en/help/using-your-pass/how-do-i-enter-overnight-journey-my-travel-calendar
However, any additional travel on the arrival day would still count as the same day as the night train.
Also, you can get off the train before 4 am, but only if the train gets to it's final destination after 4 am. What they don't address is what happens if the train leaves after 7 pm but gets to it's final destination before 4 am!
If the cost of the two short trips on the first day is less than the cost of a day of your rail pass, then pay for the two trip separately and save a day of the pass (assuming you have somewhere to use the saved rail pass day).