People desired flat roads before cars. There was a huge effort in XIX century to develop better roads for the horse-drawn buggies and stagecoaches.
Edit: The Eiffel Towers had some, earlier than that. See comments ;) Sorry.
Google comes through for once.
https://www.amusingplanet.com/2020/04/the-elevator-shaft-tha...
tl;dr: Cooper Union's Foundation Building built 1853. Otis demonstrated his invention at the Crystal Palace in 1854, first installed Haughwout Building in 1857
Also freight elevators existed for a long time before but were unsafe for passengers.