1. She should have known the risk of walking down that dark alley by herself.
2. It's important to understand that it can be dangerous to walk down dark alleys by oneself.
The latter is just solid advice. The former is easily interpreted as "blaming the victim".
You're right, by pointing out the risks, you took the risk of being labeled a victim blamer. And yet you still managed to use victim-blaming language despite being completely aware of how it would be taken. All I can advise is to take more care with how you word posts which you know will be controversial, and if it's pointed out, merely apologize and mention that you didn't intend that interpretation, rather than essentially repeating your victim-blaming mistake again by blaming people who read your post for responding to the words it contains rather than reading your mind to glean your intent.