You have improved it, but there are still some things to do.
I have tested the sketch, and the first valve is opening and closing (just once).
You could make the delays a few seconds. Perhaps the valve doesn't react to 55ms.
You increase the time for the next period, that's okay, but you should do that also for the other times.
The duration is not the moment in time, but the time after the valve is opened.
So you have to make a choice: define the duration as the duration or define it as the moment in milliseconds.
Suppose you define it as the duration, then this :
// triggering first valve (immediately)
if ( (millis() - startTime) >= time_to_open_first_valve)
{
digitalWrite (6,HIGH);
time_to_open_first_valve += recycling_period;
}
if ( (millis() - startTime) >= first_valve_open_duration )
{
digitalWrite (6,LOW);
}
should be this:
if ( (millis() - startTime) >= time_to_open_first_valve)
{
digitalWrite (6,HIGH);
}
if ( (millis() - startTime) >= (time_to_open_first_valve + first_valve_open_duration) )
{
digitalWrite (6,LOW);
// Now that the first valve has been opened and closed,
// the new time can be set for the next period.
time_to_open_first_valve += recycling_period;
}
Do you know that the digitalWrite() is called many times ?
To set an output, calling digitalWrite() just once is nicer.
In your code the conditions are valid for some time, and digitWrite() is called during every loop.
I also would call millis() just once per loop.
In the loop function you could do this: unsigned long time_millis = millis() - starttime;
And use the variable time_millis in the code.