One under-mentioned hazard for pedestrians and bicyclists is poor outdoor lighting at night. I cannot tell you the number of times high-glare lighting has blocked my ability to see a pedestrian or cyclist.
One thing I've noticed that makes biking/walking in conjunction with cars much safer is the construction of road-sized sidewalks with clear delineators, where pedestrians and cyclists can safely pass. In Helsinki, biking was a joy, despite the busy streets nearby. I saw the same organization in many parts of Israel—big sidewalks with a section designated for bicycles, scooters, and e-mobility devices. In many of the small cities surrounding Stockholm, dedicated bike paths with their lighting were located adjacent to the main roads.
Around where I live, there is a three-lane main thoroughfare that has two lanes for travel and one lane for turning. There are sidewalks along this road, but they are functionally destroyed by the roots of trees growing near them.
This could become more bicycle-friendly if roundabouts were installed at major intersections and the sidewalks were expanded to accommodate pedestrian/bicycle use. Although if they did, I could hear the screams about how the roundabouts are impeding traffic flow for commuters and removing all the sidewalk-destroying trees.
I agree with the people who say it's not that we can't do it, it's that we won't do it.