Detonation isn't immediately fatal. Mild detonation can exist for hours without damage. Moderate to severe detonation will cause the CHT to rise rapidly and will damage the ring lands. It can also lead to pre-ignition which will be very damaging very fast. CHT rise during pre-ignition will be very fast indeed and the piston may be damaged and fail in a minute or less. Thus we want to avoid detonation because it's hard to tell when it is severe. It is relatively easy to tell that it is not happening. If CHT is not rising rapidly, it isn't detonating to any great degree. Detonation is not only a function of manifold pressure, RPM, mixture, and timing. It is a function of those and, most especially, high cylinder temperature. So the trick is to not spend any significant amount of time with a power setting which could lead to high temps and potential detonation. Thus the "big pull". It needs to be smooth but not slow, say on a count of 3 similar to what you would do when going to full throttle on the takeoff roll or pulling to idle cut off. What you don't want to do is slowly pull mixture while whatching for the EGTs to peak and drop. Screw the EGTs. The best and highest use of EGT gauges, once the injectors have been balanced, is to diagnose fouled spark plugs during runup.
How to avoid detonation if you have well calibrated injector nozzles? Take off full throttle and full rich unless at a high density altitude. Your fuel flow should be high enough to ensure that you are well ROP and this should keep your CHTs under control during initial climb. At some point, pattern altitude or cruise altitude - your choice, reduce RPM if you have a constant speed prop and do a big pull on the mixture. Pull right through the "red box" until you feel a decrease in power and are still running smooth. You are now lean of peak and are at a reduced power level. Detonation is unlikely. If you want, you could even pull some throttle, but I don't think it's necessary or beneficial. The engine is going to be the most efficient with wide open throttle - less pumping losses. Let everything settle for a bit and check fuel flow for a number that you expect from experience and check and monitor your CHTs - all of them. If CHT is say 380 and rising, lean more - as long as it's running smoothly -, increase airspeed, reduce RPM and/or MAP, open cowl flaps etc. If none of that will control CHT, your injectors might not be as well balanced as they could be or your ignition might be too far advanced. Good baffle seal is also necessary for CHT control ROP or LOP. Experiment with this at higher altitudes where manifold pressures are lower and work your way down.
If the CHTs are rising rapidly through say 380 and you can't stop the rise with any of the above procedures, you need to push the mixture to way ROP and reassess why. CHT control has to be ahead of anything except aircraft control. Also, don't run into anything. ;-) Keep in mind that conditions change and what worked yesterday might not work as well today especially if the OAT is higher.
With a carbureted engine, it's a little tougher but not necessarily impossible to get far enough LOP with a smooth running engine to protect from detonation at low altitudes and high manifold pressure. On our O-320 powered fixed pitch 6A I used to pull about a tenth inch of MAP and lean to rough and then back a touch. I was able to cruise at 3000' like that with happy CHTs even on hot SoCal summer days. The slightly cocked throttle plate helps to swirl the mixture and helps with distribution to all the cylinders. Another trick is to add a just little bit of carb heat and then lean some more. Don't try any of this down low the first time and always monitor CHTs.
My 10:1 IO-360 works well with this method, though on very hot days I sometimes need to use my cowl flaps. Your mileage may vary. Sneak up on it and don't blindly take my word for it.
Ed
RV-6
I've read this in other places as well, but one thing that is not clear to me is that it seems like detonation could cause some damage quicker than a CHT probe could react.