Romans8 Very unusual question! 😉
A train in Switzerland ist not an airplane! Worst case maybe 1 minute, depending on the numbers and clumsiness of your fellow passengers. And, as opposed to airplanes, there are no seatbelts and you may already move toward the doors before the train came to a complete stop.
I would be more worried e.g. about
1.) the distance between where your (train) coach stopped and the location of the stairs/ramp/escalator you need to take for leaving the platform
2.) the general distance between the train station and the bus terminal. Especially, as you seem to indicate, in case of some long-distance bus (such as Flixbus) and the location happened to be Zurich HB (City). In the latter case, 4 minutes between train arrival time (often 1 minute late) and bus departure time would usually not be enough, unless running like mad and/or the bus driver waits a couple of minutes…