The actual lag cannot be eliminated.
It's the time the ECU takes to calculate the actual throttle position from the foot input and adding the time for the throttle electric motor to actually get to the selected position.
The perceived lag drivers experience in throttle response is
not because of
limited computing power for a vehicle using 2018 technology. Turning a variable input voltage from the pedal into a variable output voltage to the throttle servo is literally a two-column table that any 30-year-old PC could execute faster than perceptible

. Similarly, the throttle servos used by automakers are very robust as a way to mitigate the initial fears of drive-by-wire technology ("what if it is too slow and I can't control it precisely?" or "well what if the throttle motor goes out??"); as such, they are more than capable of responding as fast as the human can move the foot (which, relatively speaking, is not all that quick).
Really, the lag is simply Toyota programming the ecu with a Kalman filter (i.e. an "averager") to mitigate the erratic or over-aggressive throttle inputs that reduce fuel efficiency. Basically, Toyota wants to make sure the driver "really means it" before responding to rapid pedal inputs with large throttle movements.
As described above, these kinds of devices
1) Alter the relationship between pedal input and throttle output so that smaller initial pedal movements result in large throttle movements to make the vehicle
feel like it is ready to lurch off the line. Pickup trucks--especially American ones--are very deliberately built like this to give the impression of extreme low-end torque output. You'll notice this with big American trucks in parking lots, where it often seems like they are aggressively lurching around when the driver is probably trying his damndest to be smooth with the throttle. In reality, my 2019 F250, which felt very peppy (and which was drive-by-wire), is no faster to 60mph than the 2019 Rav4.
2) Limit the ECU's tendency to filter out rapid pedal inputs, sort of like an extreme version of how "Sport Mode" already does that compared to "Eco Mode."