I am the owner of a c5 a6 2.7t, and am having misfire issues, even after already replacing all spark plugs and coils for cylinders 1&4.
After running VAG-COM, I got code's for: random misfire, misfire on cylinder 1, and misfire on cylinder 4. I've been researching and saw that people were recommending switching the connectors on the ignition control modules. I find it odd that after i cleared the codes, switched the connectors on the icm, and started the car again, cylinder 1 was no longer misfiring, just cylinder 4.
Background on the car: I've read that people were having issues with the coolant temperature sensor, but I had already replaced that part, and don't feel that to be the issue. I've also had the dreaded nightmare of having the transmission control module under the passenger seat get flooded. No need for concern though, it's dried out, and in working condition. The car was misfiring before the flooding happened, so that rules that out (I believe).
My car has 137000 miles.
My car has an automatic transmission.
It sounds like it could be the harness and simply disturbing it by swapping connectors eliminated cylinder #1 from misfiring, for now. Having owned a few VAG products and having many friends with them, you might want to try a coil conversion/ICM delete kit.
Enlist a certified mechanic, such as one from YourMechanic, if you need some help with getting this fixed. They will be able to diagnose your misfire firsthand and help you fix it accordingly. Good luck.