From the ~70's until the early 2010's Kansas City's downtown was in a similar "doom loop" of crime, undevelopment, decaying historic buildings, etc... In that city 75% of the metro lives in suburbs, drives in to downtown for work and promptly leaves. Until about 2012 or so. Urban redevelopment kicked in, adding (free!) transit, boosting retail, arts district events, a new stadium, and crucially - *massive office to housing conversion projects*.
There are tons of success stories like the historic Fidelity Tower at 909 Walnut (https://en.wikipedia.org/wiki/909_Walnut), a huge 35-story tower that sat vacant (creepy) for the better part of a decade and is now home to 159 units. Ditto with the Power & Light Building (https://en.wikipedia.org/wiki/Kansas_City_Power_and_Light_Bu...) (36 stories) - largely vacant for the better part of 20 years and now home to nearly 300 units. I could go on, every block has similar projects of 100+ year old buildings of nontrivial sizes that are now super unique apartments. I myself lived in the 30-story Commerce Tower (https://en.wikipedia.org/wiki/Commerce_Tower) for a while and it was incredibly cheap to do so (~$1100/month for 750sqft 1 bed on the 14th floor), I had a 10 minute commute by foot to my office, it was awesome. Even the more squat, broad midsize banking buildings have had major success with residential conversions.
These kinds of conversions have been proven out when there is willpower to do so at the city level - people will move in and prices typically get competitive fast if done at scale. I've lived in SF for 4 years now and I'm convinced its a policy problem not an economic problem.