M.P.
I suspect he's angry because the new baby is coming. the second baby took over his space and he had to share attention with him. Now here comes a third one. He wants to be the only one again.
3 yo doesn't yet understand his world. New things, especially new baby things cause him to be anxious. He may "remember" how he felt when the second was born which makes his feelings stronger this time. He probably doesn't actually remember but the memory is in his body and brain, yet unconscious.
Also, as you said, he may be worried about your pain. If he's not going to be in the delivery room he doesn't need to know any of the details of birth. He can't understand and put them in perspective. He may see you in pain before you go to the hospital but I'd limit that too. too much info too soon creates anxiety.
When my grandson was born his 3yo sister was asleep in bed when her mother's contraction came on full force. My daughter had false labor a few days ahead of time which helped her daughter to become aware by actually experience and could see that Mama was OK and came home.
I suggest that you have a gentle short talk with him. Ask him why he's hitting brother. Ask how he feels. Reassure him that you want to know and will help him with his feelings and actions. Talk about having a happy family with all 3 of the kids. And that he will always be special because he's the first. Suggest to him that his younger brother isn't old enough to understand and maybe he's doing things that upset you. Ask him to be your helper. Give him small things to do now. He could help put diapers and clothes away. He could draw a picture about his new baby. Praise him ahead of time for all the things that he can do to help you. One of them is to stop fighting so much with his little brother. You could be sympathetic with him about how frustrating little brothers can be. Ask him to come to you when he feels like hitting him, taking away a toy, yelling etc.
Congratulations on your new baby!