Is boxing dangerous?
The dangerous part is optional.
Nobody makes you spar, and nobody makes you fight. Most people who box never do either. Hitting a bag, learning to move, and getting in shape carry about the same risk as any other hard workout: sore hands, sore shoulders, the occasional rolled ankle.
Most of those are avoidable. Ten minutes of warm-up before you hit anything, some jump rope, shadow boxing, arm circles and hip swings, gets your shoulders and wrists ready for impact. Wrap your hands every time. Stretch after, when the muscles are warm, not before. Any coach worth paying will run you through all of this on day one.
Sparring is different. Getting punched in the head has real risks, and headgear helps with cuts more than with concussions. That is not a reason to avoid boxing. It is a reason to decide about sparring later, with a coach who knows you, and never on a day you feel pressured into it. A good gym asks. It does not assume.
If you want the training without any contact, fitness boxing gyms are built for exactly that. The only thing you hit is the bag.