an block observer could start automatically and stop the engine if a player entered / get off a cart on the train they.
an observer block would automatically start and stop the engine if a player entered/exited a cart on the train.