I have a 1995 Lexus ES300 with 126,000 miles that I bought used in May. It started doing this weird thing a few months ago where if it isn't cold, or fully hot, it has trouble staying on when starting if I don't rev the engine a bit. If I start the car cold, it starts up fine. If it's at full temp, it starts up fine. If I go inside somewhere for a bit, like to get groceries, and the car starts to cool down to an in between temperature, when I try to start it, it will die if I don't immediately start revving it for a few seconds. The weird thing is, I used to have a 1990 Toyota Camry XLE that did the same thing, except for the Camry to not die, I had to keep revving until the car heated up again. I think a mobile mechanic replaced the starter on my Camry, but I think I remember that only helping for a few months, then the problem came back. I recently used a Topdon ArtiBattery 101 to test the battery, starter, and alternator, and it said they're fine. I thought maybe it's a fuel system problem, but I haven't checked that yet. The battery terminals aren't corroded at all, but there's a dark red goop on them. I assume that's a protectant someone used a long time ago. I would replace the terminals, but there isn't quite enough slack to do it the way I know how.
I would change the air and fuel filter and clean the mass air flow sensor.if that didn't help do my video how to clean fuel injectors without removal on YouTube
If you have access to a scan tool with live data it might be worth a look to see what happens when it goes from closed loop (running on the computer) to open loop (running based on the sensor data). Sometimes you can see what's out of whack that way. As it warms up you may be able to see the data change.