A recent commit added a spawnflag to path_corner which makes it stop trains. Simply set a path_corner's spawnflags to 1 to use this feature. (This won't work in Alpha 42, build from source for now.)
This simplifies elevators and togglable doors a lot - they can now be constructed using only 2 path_corners. Here's an example.