The bridge modules can be fairly easily swapped out in drydock, but I don't believe that can be done while underway.
The Galaxy class was the first class of ship with a saucer separation system that could be re-attached while in flight. I believe the Constitution class did have the ability to separate its saucer, but that was accomplished with explosive bolts and it couldn't re-attach without being in drydock.
That galaxy-class saucer separation thing was honestly not a great idea, and it was somewhat annoying when they used it in the episodes. The problem with it is that only the "stardrive" section has warp capability, so what good is it to be able to separate except for using the saucer as a last-resort escape pod in case of warp engine failure? The saucer is simply too slow to go anywhere in a reasonable amount of time without a warp engine: at sublight speeds, it would take years just to get to the closest star system. This is probably one of the most annoying things about Star Trek: they completely ignored speed-of-light issues like this too often. Using "warp drive" as a plot device to get the characters from system to system in a week or less at FTL speeds is fine, but if you're going to do that, don't fall back on sublight "impulse drive" as something that's actually useful for anything except getting into and out of orbit.
The saucer section can still maintain a warp field for a little while after separation at warp, it could potentially coast quite far out of harms way.
Tactically that would only make sense if the engineering hull could keep an enemy ship entirely occupied, if there was more than one enemy ship engaging then its going to be difficult to keep them all from pursuing the saucer.
You are right though, if you did suffer a warp core breach you aren't going anywhere quickly. But in almost all situations help is only one subspace call away.
>But in almost all situations help is only one subspace call away.
Huh? No way; whether you're in a battle with 3 cloaked Romulan warbirds, or have an imminent warp core breach, you have minutes, at most, to get help. Other starships aren't that close by.
One of the reasons for that functionality I don't recall actually making it to an episode - tactical advantage in a fight. The rear section had increased maneuverability when separated, and it resulted in two targets for attackers, both of which could fire back.
Yeah, the warp core ejection systems always seem to conveniently fail. You would want to dump the entire engineering section and haul ass if you were sitting on an antimatter bomb.
There were also physical backups in case the automated ejection system didn't work. There was always a physical backup to any touch interface that was critical to system operations.
The Galaxy class was the first class of ship with a saucer separation system that could be re-attached while in flight. I believe the Constitution class did have the ability to separate its saucer, but that was accomplished with explosive bolts and it couldn't re-attach without being in drydock.