When the car is moving non-horizontally, things are different. The extension of the spring is no longer proportional to acceleration of the car along the road - some of the extension is also caused by the resistance of the car to rolling downhill. Unless one knows the slope of the road, one can't back that effect out, and acceleration and the quantities produced through integrating acceleration will be calculated incorrectly. The key is that accelerometers measure the deviation from free-fall, not the acceleration relative to whatever reference the user might find convenient – and at the Earth's surface, an object that isn't falling towards the center of the Earth at 1 gee is deviating from free-fall by 1 gee upward.
George Gamow and others considered this to be a fatal flaw for the concept of inertial navigation.