This is solving the wrong problem. If a traffic light can turn green at a whim, for any arriving app user, the intersection is not busy enough to have a traffic light. Then the traffic light should be removed or switched off for those times, instead of getting a very expensive (I presume) upgrade. If the intersection is busy enough so that people are waiting on all (or most) stop lines, then simpler traffic density sensors are a better, less invasive, far cheaper, and more privacy-preserving option.