I have never seem any software, nor Transdem, that automatically, precisely lays track exactly where the contour lines actually are, and they that may be out of register on two or more planes (N, E, S, W) way off by many meters in any direction, even on a high quality data DEM, and the accuracy is only as good as the accuracy of the person doing the tracing.
TransDEM is only the converter. Accuracy is solely depending on the geo data it processes.
For the elevations, we have to look at available DEM and their quality. I would leave Google Earth out of here. They do not produce DEMs themselves, they just import them from other sources and don't normally tell you what they used.
We distinguish terrestrial and orbital DEMs. The often cited SRTM data set is orbital, relatively low resolution and elevations subject to significant error in built-up areas and forests. A lot has been done in the last years to make this data better, as it is the only reasonable source for many parts of the world. Nominal horizontal resolution is 3 arc sec, that's about 90 x 60 meters at moderate latitudes, therefore often referred to as 90m DEM. There is also the 1 arc sec (30 x 20m) variant, and I would suggest to use that. Slightly better than 3 arc sec, but not living up its nominal resolution. So, wherever we have the chance of accessing terrestrial DEMs we should go for those. A terrestrial DEM of 50m horizontal resolution will have better accuracy than 1 arc sec SRTM, as they are produced the same way as topographic maps, from terrestrial surveying, without the elevation error for buildings or trees. Counterpart in the US: USGS NED 1 arc sec. Far better than SRTM 1 arc sec. And there is also the USGS 1/3 arc sec, I believe for all CONUS states.
In the last couple of years we see a new technology emerge: LIDAR DEMs. These can go up to 25cm resolution for some, albeit very small areas, due to the exorbitant amount of data. But the entire country of Denmark is available as 50cm data. In the US you find more and more 1m data, but still very limited. Noteworthy, that these LIDAR DEM always have a metric horizontal grid, because data in the Plate Carrée projection ("arc sec") would lose too much detail during the necessary conversion. Vertical accuracy is in the decimeter range. You will be able to make out plough furrows in the fields.
Cuttings and embankments ("high fills") for railway lines? No problem with a LIDAR DEM. But keep in mind that the maximum horizontal resolution in Trainz is 5m.
However, the DEM is only one aspect of geo data, the terrain. The other is the topography on top of the terrain. And again, it's the geo data source that is important.
In the ideal situation we have access to the official railway infrastructure data and track geometry, in analogue or digital form, but in reality that is rarely the case as this kind of data is not public. The German railway simulation Zusi in its variant as a professional driver/engineer training station sees its prototypical routes built with such data. The S-Bahn Munich project for example has the S-Bahn city tunnel modelled with geometry based on 1:1000 or 1:500 plans to the utmost precision. (If you are familiar with the area and have visited Munich, and who hasn't

, at least once as a tourist at the October-fest :wave:, not this year though

.)
For us normal people without access to original track geometry, we have to live with publicly available data. And as we all know, quality varies. Don't take the precision of ortho-imagery for granted, particularly if it comes from one of the global services like Google. If you happen to build with 1m LIDAR DEMs, take that as your reference, not the ortho-image.