Hi J.. the biggest problem to all of this is that we want our children to be perfect. They aren't. They get frustrated, and they act it out because they don't have the words to resolve the problem.
I have spanked my children, but not much, and I woudn't say, "I believe in it." I accept it when it happens, but hopefully it doesn't happen often, because then all it teaches is that the stronger person wins. Some say that's not bad to know -- because obviously the cops, the government, etc., they are all STRONGER than you are, so it stops you from breaking the laws later. I wouldn't go that far. Respect for authority can be learned in many ways, not by being hit by those in authority.
Children go through stages. They have a time of internal growing, that is pretty peaceful to us parents, then they push their limits because they have grown. We see that as wanting autonomy, being rebellious, being BAD. But they are experimenting and growing, it's just not what we had in mind. After that, they settle back down, and consolodate their new position. then, yup, you got it, it's a time of expansion again, and they are seemingly on the warpath with mom and dad again. I suspect your son started his "autonomy" stage at 2.5 instead of 2, and he hasn't moved onto the consolodation part yet, but he will. The trick is how to handle the hitting in a way that the discipline makes sense and will stay with him.
I always taught my kids that it was okay to be angry -- after all, we can't change emotions. We have them. They exist. They aren't right or wrong. They just are. When you discipline him, say, no you can't do that, it's frustrating, but he may not be verbal enough to say, "Gee mom, that's really frustrating, I'd like to do it, can we talk about this?" (right !) So he has a choice, to suck it up and obey, or to defend his position, and when he defends, he hits. I recomment helping him with words. Control his body so he can't keep hitting, and say, "Are you upset that I said no?" I assume he'll nod or somehow confirm that, and then you can explain in easy words why you told him he shouldn't do whatever it was. Tell him that it's hard to obey, and you realize that, tell him he's a good kid and you love him. When he obeys without a fuss, or lets someone take his toy without hitting them, be SURE to notice and give him some really big kudos for his behavior. That's absolutely amazing, and awesome behavior for a 3 yr old.
Give him opportunities where he gets to control his environment and make some choices. Do you want peanut butter or chicken for lunch? Do you want to help make our lunch, or shall I make it ? Do you want to play in the sand box or go for a walk? As he learns to make choices, if he doesn't know, you can talk about the good things about either option, and the bad things -- like, if you play in the paddle pool, you'll have to change into your bathing suit, and afterwards, you have to change back into clothes. . . whatever . . . The more control he has over things that he does (reasonable, appropriate control within limits) the more autonomous he will feel without having to strike out.
The other thing we always did with toys happened BEFORE company came. We selected toys that were "okay" for everyone to play with, and we selected special toys that our kids didn't want to share. We agreed on which was which, and the child made the decision. I might suggest the more expensive or breakable toys to the kids to get them in the private category. And we moved thosed toys out of the arena. That way, the toys everyone played with when friends or family came were not the special toys with emotional attachments and it was agreed upon in advance that we would share those toys. If the toys BELONG to your son, they are HIS, and he should have control over who plays with them. So it makes sense for him not to want to share them. And some of them he shouldn't have to share. So if he can help make those decisions, you can talk about how sharing feels when you are putting away the private toys. For instance, if he puts all his trucks away, and doesn't let his company use them, well, he won't be able to use them either. And they might miss out on some fun, if they don't both get to play with trucks. There are pros and cons to every decision, and thinking them thru, even at a 3 yr old level, will give him some framework for thinking things through as he gets older. So when he's a teen, he thinks through some of his decisions and maybe even shares his thoughts with you as he does so. That's when it's really rewarding !!!!