The biggest headache in computer control is not the software, nor the computer, but the sensors that are needed to "read" the layout status, and feedback/confirm status changes. The complexity of the sensor system grows very quickly with the number of trains and turnouts.
Every time a DCC command is issued, the physical implementation of the command must be detected by sensors so that the computer knows that 1) the command has been implemented 2) the layout status has changed. A system that assumes command implementation without separate detection will soon get out of synch with reality due to error build-up. You will also need within the software a dispatcher over-ride, again to keep the synchronization of layout status despite errors creeping in.
It's been done, but not easily.
Yours in dispatching