Correct - any car's maintenance history is most important. A car with only 30-40k on it, but on the same oil, is not a good thing.
Mileage is useful though because it gives an indicator of the mechanical stress on the engine particularly, and an objective one. There are components like belts which have a lifespan best/more easily measured in miles. If those serviceable/maintenance parts haven't been serviced/maintained there's going to be a issue.
In terms of engine internals, the better indicator of engine wear is engine cycles - i.e. how many times the car has cycled from cold-ignition-heated running-off-cold again. This isn't really tracked though.
This, along with the fact that there isn't a big variance in engine speed, is why motorway/highway miles is still relevant - those cars have travelled a lot of miles - maybe 100-200 daily but maybe only in 1 engine cycle.
You could also buy an X-class pickup, and then you'd have both a Nissan and Mercedes in one go