I wouldn't say majority of the country is batshit crazy, it is just held hostage by an archaic religion that is extremely violent towards blasphemers.
You might say, that is not much of a difference, but imo it is a meaningful difference because most muslims disagree or refuse to act on this belief (as evidenced by the police and shopkeepers who protected the girl), they just can't do anything to change that it is part of orthodox Islam. So the hardliners win on this one, every time.
Only way to fix it is to secularize the state, which will either take a revolution or a lot of fucking time. Definitely not happening in my lifetime.
Generally, if you keep a low profile, you're fine. It's not like the average person will try to fight you if they find out you're an atheist. It is extremely taboo, though. In my case, most of my friends are left-wing activists and/or artists, so it is not a problem for me socially, but I think I am an outlier in that respect. I do hide it at the office though (or at least I did when I was going to one), and from my extended family, and of course from strangers.
It is absolutely not something you can be public about. If somehow, you become publicly visible and recognized as an atheist, it is best that you flee the country lest you end up in the same situation as the girl in the OP.