I don't have advice for "keeping him excited about the class". I perceive you have an opportunity to teach (put a name on) emotions like empathy, compassion. It also provides an opportunity to introduce the concept of boundaries - which goes a long way towards managing and preventing anxiety. If your son witnesses violence, does tha make him responsible? (No.) But many people do take on control and responsibility for things outside of their control. You can coach him "what do you control in the situation / what do you not control?" What are appropriate responses for him? Well, mindfulness meditation would be a good one. Reassuring that his teacher and the struggling child's parents are doing their best. Also, presenting that te struggling child is doing his very best in the situation, and there's a reason why he's having difficulty. That being known for hitting and having trouble with friends is not fun for him and he's not choosing it for himself. "Children do well if they can."

What the struggling child does is beyond your control. At preK level, I don't think too much of it. However if your son stays with the same peer group for some years, stay aware of the situation.

My son had a similar experience. He started bricks-and-mortar school in 4K. I pulled him out of bricks-and-mortar school after 1st grade, but he still took gym/art/music there in 2nd grade My son and the bully child forged a friendship, but the bully child was still struggling. 3rd grade my son went to elementary school for gym/recess, until there was an incident where the bully asked my son to play, my son said no, and the bully attacked him. One of the girls my son was playing with took off her shoe and started beating on the bully kid - if that gives you an idea of the level of chaos and animosity going on in the whole class.

A child hitting in preK is a whole lot different than in 3rd grade. It's likely self-limiting, but if not, stay aware of the situation as the years tick by.

Try to keep perspective an empathy for the struggling child as well.