In addition to the other answers, the security of the system involved and closeness to trade hubs is significant. It is relatively easy to get to 5 standing. It is hard to get to 6 and a pain to get to 7.
Is the safety of the POS further influenced by anything else (ie: putting it in a 0.9 system instead of a 0.5 system)?
The highest security system that the game lets you anchor a POS is in 0.7. There are a number of people with 2 corps: one to wardec weak looking targets near trade hubs, and a real-estate corp that sells locations near trade hubs. These people will not bother folks in 0.7 systems.
Because there are more corps with 5 standing than moon slots near trade hubs, it is possible that your business competitors may decide to beat you up just to get a moon slot near the market.
There are 2 theories/doctrines of how to set up your POS: deathstar and dickstar. A deathstar is full of guns and will blast anyone who wardecs you (in null or low security space, they'll just start shooting because wardecs are not needed). In nullsec, most deathstars are set to NBSI ("not blue, shoot it", meaning shoot at everyone who comes in range who is neutral or bad standings). A dickstar is one with 40-120 ECM and electronic warfare modules (a large tower can put 40 online). In highsec, a dickstar is going to be a miserable target to wardec due to the jamming (since capital ships - which are immune to jamming - are banned in highsec). Judicious placement of secure containers when wardecs are made will frustrate the wardeccing corporation.