I spot-checked current fares Vienna-Berlin on the Deutsche Bahn website. You could buy a ticket (non-refundable/non-changeable) today for travel on June 20 (randomly selected date) for just 39 euros. That fare will escalate as others snap up the bargain tickets, but it's available right now.
I looked at Venice to Obertraun on the OBB website, buying today and traveling on June 16. The night train is currently available at 54.80 euros, but other trains are as low as 39 euros. Perhaps you could get that price on your actual travel date. Again, the low price will not be available forever and is non-changeable/non-refundable.
Also on the OBB website, the Obertraun-Vienna leg is currently available at 19 euros, and the entire Obertraun-Berlin trip is priced at 48 euros or 76.20 euros for June 20.
Traveling east from Obertraun to Vienna to pick up the night train adds 4 to 4-1/2 hours to the trip to Berlin. If you were willing to depart from Obertraun at 12:28 PM, you could be in Berlin at 11:10 PM the same day and sleep in a real bed. That ticket (for June 20) would cost you just 39 euros today (via the DB website). There's also a connection through Mannheim for 39 euros that includes 6 hours on a EuroNight train and means under 11 hours on the train, vs. about 14-1/2 hours for what you're proposing to do.
All the above prices include reservation fees where required.
It looks to me as if you can do this more cheaply by buying point-to-point tickets if you're prepared to buy them now.