Shadowbox more, with emphasis on footwork. You have to be able to move around to where you need to be in the ring, without thinking about it. It should be practiced so often that instinct and muscle memory does all the work without you thinking about it.
Also it sounds like you need some tools when you're in that situation. If someone is swarming you, you can't really expect to just stand there and jab your way out, unless you have a killer jab. You're going to need some counters, you're going to need to slip, move, bob & weave, throw meaningful punches etc.