Hello & Welcome to JA,
What you have described sounds like a faulty throttle angle sensor inside the electronic throttle control. Any type of intermitten problem is harder to find. I have seen several of these fail & this is one of the symptoms.
Yes, this would have been missed because it was not failing at the time. The throttle body assembly must be replaced . There are 2 sensors in this unit /non serviceable.
This is around 500.00