Factorio is closed-source, unfortunately. Still, you can read a lot about how the devs developed it on their "Friday Facts" posts: https://factorio.com/blog/
Basically - tests, reproducibility, and dedication to tracking down "weird minor bugs" before they become "major show stoppers".