In relation to the topic of the thread's title
SPECIFICALLY LOGITECH G29 AND SIMILAR PEDALS:
When your brake or gas pedals become erratic or unreliable, and the actions on the screen don't match with the pedals actual inputs, especially if you set your pedals on carpets all the time or you wear socks...
I would say depending on how often you play, dust bunnies will get onto your pots and crevices behind and inside the pedals.
It can be as soon as 6 months of play, to over 2 years of use....
Check first on the pedal calibration page, you will clearly see when it is NOT functioning correctly and there will be inputs or non inputs where there should be....
That's the time you will have to open up the pedals and be very careful with the electronics AND the thin small wires...
Dust it all up and clean up remove all of the dust... Possibly use isopropyl alcohol.
I just did that and my pedals are all brand new now....
Works so well compared to how it was before.
This is to say that: nothing wrong with the cars or the code, it's your pedals and dust bunnies Infiltrating in.
I have some pictures I can share later when I have the chance.