But there's two problems with this:
The actual marginal cost of the trip is still 25.4 €, plus let's give it a generous maintenance cost putting it at around 50 €. That's still less than half of the cost of the ICE. Add to this that you now have a car which can carry five people and the costs don't increase at all per person. A trip with 5 people is still going to cost you that 500 € instead of 615 €.
The second problem is that this is when you're buying a new car. Buying a used car would very easily bring your 247 € cost down below that 123 € even with the increase maintenance costs.
Berlin to Frankfurt takes about 4 to 5 hours. For the car, this is time spent driving. For the train, we may have to subtract about 30 mins waiting in Leipzig or Hanover for a connecting train, leaving you with 3.5 to 4.5 hours in the train. At a modest 15€/hour, your car trip is now 77.9 to 92.9€ more expensive than the train journey.
I'm not trying to advocate for the car, (I much prefer train travel - especially on DB) but based purely on costs, it doesn't stack up... BTW, train prices are similarly stacked in the UK, with it rarely being more cost effective to take a train unless the convenience factor is a major part, like going to central London...
A 2nd class ICE ticket (without any reductions) is 123€ (1st class is 203€).
Going the 550km (Google Maps estimate) by car will cost 247€ (estimated by the ADAC, the largest German automobile club, for a VW Golf VII).
While you might want to argue that if you drive a lot by car, those costs per km will decrease, the same goes for travelling a lot by train.