> Asserting that e.g. people pooping in the street is caused strictly by expensive housing would require some mental gymnastics
Key word being strictly, i.e. expensive housing is the cause of street pooping, and there is ultimately no other way to prevent street pooping other than to reduce housing costs broadly.
Raising police salaries is obviously a much easier problem to solve, right? It is something that is already under government control and it can be modeled using a simple spreadsheet. Housing cost on the other hand is not really possible to model accurately, the system is too complex and has too many inputs.
Also like any other job, the best way to get good police officers is to have lots of competition. If you are desperate for staffing, you aren't getting the best.
That is a better solution than building more housing?
A community is a social construct, you have to keep a lot of things in balance for it to work properly. The most important part is giving people a roof over their heads. Overpaying for police (or teachers, or nurses, etc) isn't going to save the day. It's the same reason you can't buy your way out of the homelessness problem!