How do I increase the output current of this linear psu up to 40A? If I change the power transistors from 2N5301 with 2N3771 and add two more will be enough (of course changing diodes, capacitors and power transformer)?
I wouldn't recommend you did that. The PSU design is not good as it is. You would almost certainly need to add a further stage of base current amplification for the pass transistors. There are better designs around.
Far easier to use a 12V lead acid battery as voltage source and rely on it's capacitance with perhaps some RF LC filter and battery charger set at 13.5V float voltage to keep it above 50% capacity between uses.