Sure, when the cameras start turning into a source of revenue then the city has an incentive to adjust the timing of the lights to maximize revenue and not minimize harm. This has happened (notably, the city of Chicago reduced the time of yellows and it led to more tickets and more accidents).
The other thing to remember is that governments don't operate red light cameras. They hire contracting businesses to install and operate them, and normally instead of paying a fixed rental/maintenance rate for the cameras those companies typically get paid a fraction of the fines. That means the designer/operator of the camera doesn't have much incentive to make the camera accurate or maximize safety, but to maximize how many cars it can issue tickets to (whether or not they're actually breaking the law or not).
When you take that to the extreme, the red light camera companies will even lobby local politicians to install more of them, and advertise them not as a tool for safety but for revenue. In some cases they've straight up bribed mayors and city officials with kickbacks from the ticket revenue.
All told, red light cameras are pretty shitty at making roads safer. What we really need are narrower roads with fewer lanes and smaller cars, but that's systemic. If we want to make specific intersections safer you can park a traffic enforcement officer at the intersection which will do more than any camera will.
The goal of a red light camera is ostensibly to make an intersection safer, but the fact that the city gets money when people get tickets incentivizes them to actually keep the intersection difficult to navigate correctly. They lose money if they adjust timings to be more appropriate for the situation or if they make the lights more visible or if they replace the light with a roundabout.
It also penalizes driving behaviors that are objectively not very dangerous far more harshly than a human police officer would—a lot of the profit from a red light camera comes from rolling right turns on red, which is very often a perfectly safe behavior that actually helps traffic move more smoothly (for example, when you technically have a red but there's a left turn crossing in the opposite direction providing complete cover for your move).
From what I recall, the real reason was that Lockheed owned and operated the cameras, took a cut of revenue, and was found to be changing the settings to issue more tickets.