In principal it's simple ![]()
You put all the stuff from above the setup()s of the 3 sketches (pin number declarations and so on) into the area above setup() in a new sketch. Make sure the pins don't clash and that you don't try to use variable names more than once.
Then put all the stuff from the 3x setup()s into a new setup()- pinMode()s and so on.
That's the easy part.
You will almost never be able to just bolt the 3 loop()s together in one resulting loop() in a new sketch- before you can do that you need to define what the finished system is supposed to do. That will almost certainly result in a new design of loop() according to what the final design is, probably with code in various functions called from the new loop().
Nobody can help unless you try first and also define exactly what the result is supposed to be. You write of "the excavator" as if it's a well known sort of "standard" project... is it?