I tried your Megabase and after some minutes only moving around a crash happens:
Error while running event STM::on_nth_tick(30)
LuaTrain API call when LuaTrain was invalid.
stack callback:
STM/scripts/general.lua:188: in function 'remove_waiting_station'
STM/scripts/general.lua:563: in function
<STM/scripts/general.lua:521>
stack callback:
[C]: in function 'index'
__STM/scripts/general.lua:188: in function 'remove_waiting_station'
STM/scripts/general.lua:563: in function
<STM/scripts/general.lua:521>