In another post it was brought to my attention (thanks @Harper) that the wiring in one of my light switch boxes might be incorrect. It was something about a shared neutral, but I don't have the knowledge to say more than that.
As far as I can tell, the black wires are energized by one circuit breaker (9) and all the others are energized by another (21). I don't know where the wires are coming from or really anything beyond what I see in the box. Here is the breaker box:
What's wrong with this wiring? Can it be fixed? My ultimate goal is to install a smart light switch, but with the complexity of this wiring I'm not sure how to do it (nevermind if this is dangerous for some reason).