It sounds like you've hit a rough patch. We went through a similar phase. And even worse, my younger son is absolutely petrified of being locked out or covered with a blanket. I think he's a little claustrophobic, and if he can't get to me, he panics.
I think your son is testing boundaries, seeking some independence and seeing how much you'll let him have. My oldest responds well to talks. We can talk to him about things and he understands. So I asked him what thing he's most afraid of (I think it's being left behind) and asked him how he feels when he's afraid. I explained that his little brother feels the same way when he locks him out. If he hit the little one, I talked to him about how it hurts when someone hits him, so it hurts when he hits his little brother. Empathy is a tough concept at this age, but it helps immensely.
After that sunk in a little bit, if he still tripped or hit or otherwise hurt his little brother, I took him away from the situation immediately and told him that he may not hurt his brother. There just isn't any room on that one. He may not hurt other people. But he has to understand what hurts other people first.
I don't use timeouts much. People don't seem to understand that they are ONLY to be used to take a child out of a situation that is overwhelming them. It's never to be used as a punishment, or to be made to feel like a punishment. But if you do see your son acting overwhelmed and then act out by hurting his brother, that may be an appropriate solution.
It also helped to set aside some toys that each could have that the other couldn't. So there was not much fighting about those toys. The big one could put his toys up higher, and it was his responsibility to control himself from taking his brother's off-limit toys.
We also went through a period of time when the oldest yelled at us or refused to do what we asked. I called it sassing (although it's not a technically accurate definition of the word, but we needed a word for it). I stated plainly that when he sasses me, he must apologize before I count to 3, or he'd get spanked and go to his room. So when he said something disrespectful, snotty, or yelled at me, I would say, "You just sassed me. You know what you need to do. One...Two...Three!" At first, he tested me and refused to say he was sorry. So he got swatted on the bum and sent to his room. There was much crying and yelling on his part, but he only did that once or twice. He started saying "I'm sorry!" and after a few months, stopped disrespecting.
It's a tough stage, but you'll get through it and things will smooth out. Hang in there and keep teaching your son the skills he needs to be a good boy.