Denver has a plan for its glut of sparkling new, high-end rental apartments with amenities like gyms, roof decks and sometimes even pet spas: It will use them to house teachers, medical technicians and others who can’t afford the city’s soaring rents.

Under a program to be unveiled later this month, the city, along with employers and charitable foundations, will pay the difference between what a lower-income resident can afford and the market rent of an apartment.

...