You can set an upper limit how full a box should be to stop accepting trains and a lower limit when the station should start calling trains again.
I use 4 boxes and 4 inserters that moves a pistol around and around. With two of the inserters wired to the chest so they the stop and start at different values.
And then the station is wired to the chest where the pistol stops at.

Blueprint: Dont forget to ad the pistol.
https://pastebin.com/7SBRwTA9