I trie to first stop the game, then buy the new vehicle, send the oldones back to depote and sell, and in the same time i set up the new vehicle to the same line. so there is nor big cap and the frequency does not drop. and this game is all about the frequency. i can imagen it is difficult to do this on single track railroads. in this situation, i also pause the game right after the train i want to replace gets to the station and drops of the passengers, then i ll send him to the depote and sell it. at the same time i already bought the new train and i set it to the lane. keep in mind this works easy with double track, for single track you need to figure out wich way the train will leave the depote (if you made a crossing in both direction) and the train which will be sold, should come from the other direction, so they do not get stuck.
this process is getting harder and will accure more often the further you’ll get, or the bigger your network is.
this needs to be done.