Wifi strength Automation . Help. Noobie here
You need to design your program using a Finite State Machine.
First start off by defining each state that your program can be in, and what is allowed to happen in each of those states.
For example:

IDLE

The only thing that is allowed to happen here is detecting the RSSI and deciding whether or not to start the engine.

IGNITION

The RSSI has got strong enough and you want to start the car. The only thing you want to do is turn on the ignition and wait a moment. Nothing more.

CRANK

Once you've waited a moment you can crank the engine. That means turning on the starter motor and waiting a moment.

RUNNING

Now the engine has started you can release the starter motor and leave the engine to idle. It's now that you want to start watching the RSSI gain.

STOP

The RSSI has dropped below your threshold, so now you can stop the engine.

IDLE

Now the engine's stopped you can go back to the start and idle looking for the RSSI to get high enough again.
These are all the states of a Finite State Machine. You move from state to state depending on different inputs or triggers.  One input is your RSSI value - or more strictly your RSSI value being above or below a threshold.  Another input is (less obviously) time. Waiting for some time to pass.
So you start in state 1. In that state all your program is doing is watching the RSSI. When that rises you move to state 2. At that point it performs whatever actions are needed (turn on the ignition) and record the time. When enough time has elapsed you move on to state 3, and do the same.
It could actually be simplified by compressing states 2 and 3 together:

Turn on ignition
Delay
Turn on starter motor
Delay
Turn off starter motor
Delay
Move to next state

You could then increase the complexity again a little (while increasing the safety) by adding extra steps when you're watching the RSSI. You can then check to see if the RSSI has been above (or below) the threshold for a certain amount of time before moving on to the next step:

IDLE - watching RSSI

If RSSI rises above threshold go to state 2.
Else stay in state 1


Record the time and keep watching the RSSI

If RSSI drops below threshold: Go back to 1.
If Enough time has passed: Go to state 3.
Else stay in state 2


Start the engine.

Go to state 4


RUNNING - watching RSSI

If RSSI falls below threshold go to state 5.


Record the time and keep watching the RSSI

If the RSSI rises above threshold: Go back to 4
If enough time has passed: go to state 6.
Else stay in state 5.


Stop the engine.

Go to state 1.



... etc ...