Can't think of any weird "take over my station" scenes off the top of my head, but the solution seems pretty simple. We've seen Starfleet does a lot of cross-training of their people, both enlisted and officers. O'Brien, on TNG/DS9, had a variety of things he was very capable at, including engineering, ground assault, transporters and manning the tactical station. Spock excelled at science but also was very capable at command and diplomacy. Sisko was heavy into starship design before taking over DS9. It seems that Trek's positive view of the future includes excellent education and very capable learners.