The technique for both photos is essentially the same, however with the photo below of the Swiss ICN passenger train I used a slight telephoto and opted to crop the sky, rather than use a graduated neutral density filter to balance the contrast/retain detail.
Below is another view from the same location near Erstfeld. Same camera, same lens, but I’ve set the zoom to a wide-angle view and I’m not as low to the ground.
The result is that the flowers remain in relative focus to the train and distant scenery. (Also I’m using the graduated neutral density filter to retain highlight detail at the top of the image).
The train is a bit small, but this photograph is more about the whole scene rather than being focused on the train.