The best that a handheld device can do is to use a barometric altimeter. It's way better than GPS altitude, which is too inaccurate, and better than triangulation from map elevation data, which is too coarsely grained.
The problem of barometric elevation is that it varies with local weather conditions, so it needs to be calibrated using map elevation data where this is available. Historically handheld devices with barometric altimeters needed to be manually calibrated with a known good elevation. Modern GPS do this automatically from map data and clever algorithms.
This combination of barometric altitude plus map calibration is the best you can get and it's provided by all leading brands.
This is not correct:
Garmin 1040 and other Garmin devices guess the elevation by atmospheric pressure: barometric height "measurement".
Therefore I don't trust them not as high as I could throw them.
Barometric elevation, as described above, is the best possible for consumer devices, and is not specific to any one brand. Brand-loyal yar-booism is the bane of threads like this.
Use of barometric height is not guesswork. It's the backbone of commercial aviation. Above a certain height (I forget what) it is used without calibration. At lower heights it's supplemented by radio altimeters (which gives height above ground, and thus needs to be corrected to give height above mean sea level) and local pressure readings.
This leads us on to why different GPSs and route planners give different total accumulated elevations for the same route. That's a story for another day, but in short:
They just do, OK?