I did a similar thing with a group of students a few years ago.
We used PIC microcontrollers talking to signals and points using a CAN bus.
We also used PWM to control the speed and direction of the train.
If I had the time to "do it again today" I think I'd use Wemos D1s (ESP8266) and Node-RED as I could control everything via WiFi using MQTT.
I like your idea of using SVG - I'm sure Bart @BartButenaers will think it's a great application for SVG.
Note:
You can write finite state machines using JavaScript (as well as using the FSM nodes).
Here's a link to a slot racing car project I did with my IoT students.