Definitely safer and smarter with two or more people. However, I have hiked alone on close to home dayhikes, with all the precautions you mentioned.
There are times when having a friend on the hike might not help in certain circumstances. But there are more times when having a friend WOULD help. I can't think of any non-contrived circumstance where having a friend would HURT. Therefore, having a friend is the smarter thing to do.