That is the slow way.
Out west, Pomona, they have a track layer train that is lead by a cat, and then a tie layer. It is all more or less automated, then the track is pulled up and clipped on to the ties. The back of the 'train' is many flat cars that carry the concrete ties with a gantry to pick them up off the flat car and run them forward to the front 'car' whre they are set down thru the open section onto the ballast. The company is H something from the mid west.
On the Pomona to SB on the UP they were pulling up the track out to the side, picking up the wood ties, grading the balast, placing new concrete ties. Picking up new rail and cliping it on to the ties in ONE operation. That 'train' is about 1/4 mile long with two locos, UP leading.