Hello, and welcome to the forum.
I don't think that this concept will work. Let's assume that you have a building with say, 50 floors. You would therefore require a distance resolution of better than 2 percent for a journey from bottom to top, or vice versa. My gut feels that this requirement is at least an order of magnitude better than might be achieved with an accelerometer.
The problem with deriving an absolute position using acceleration measurements is that a double integration process is required, firstly to derive the velocity from the many acceleration samples, and then to derive the position from the velocity characteristic. This is subject to many cumulative errors. You would also need to start from a known reference position, and frequently recalibrate whenever located at this position.
A further consideration for this application is that only z-axis readings are relevant, but this axis will be subject to an offset of 1g, which may reduce measurement resolution. The delta-g about this offset will represent the acceleration of the lift/elevator. I presume that mid-journey, there will be constant velocity, resulting in zero delta-g. Therefore position must be estimated from the derived velocity and elapsed time. Maybe the velocity error could be in the region of 10 percent, but I am guessing. However, since there is a tendency for the velocity to become zero after a deceleration, this does allow for the velocity to be recalibrated.
Regards,
Mac