Man, this discussion got out there pretty fast....................
Read here:
2005 Ford Mustang Research Center (mustangspecs.com)
Click on the Modern Years dropdown menu then under 5th Gen click on any MY from 05 thru 10 to read up..... you'll see which MY & model S197 4.6L-equipped car's ECU calibration (specific ECU OS\strategy....) had adaptive spark control activated in it (the dual spark control that could auto-adjust base spark advance timing based off sensed fuel octane AKI thru knock sensor activity then save it in KAM for future use.....to make it short for some, this is '08-'09 Bullitt & '10 GT only). You'll also note that for 07-09 MY's there were 2 different HP\TQ ratings for the 4.6L V8 based on VIN code....H code is the std 300 HP\320 TQ vers (08-09 Bullitt was H code bumped to 315 HP\325 TQ via specific Ford ECU OS\strategy calibration), S code is the 319 HP\ 330 TQ vers (07-09 Shelby GT\GT-C\GT-H only.....via specific Shelby American 3rd party ECU\strategy calibration).
In short, the typical knock sensor strategies within all 05-10 SO ECUs are more nuanced in operation & have more capabilities\potential than what is largely, publicly understood. To get more on this go here:
Lunati VooDoo #21270700 Camshafts | S197 Mustang Forum - S197Forum.com. Start reading from pg 10 onward (covers all from when I started doing my own tuning......including the knock sensors.....that is, if you're interested).
All SO ECU knock sensor strategies work at a base level, once activated, to essentially retard spark advance timing when cyl knock is detected until the knock stops or heaven forbid it caps out during retard (to protect engine from detonation), then will try to always add the cut spark advance timing back once no more cyl knock is detected until either 1.) it caps out during advance or reaches the MBT spark advance tables output w\o exceeding it, whichever comes 1st, depending on how this is all set up in tune file or 2.) detects cyl knock again thus repeating this process. The SO ECU OS\strategy calibration does need to know the fuel's AKI (or octane rating) to be able to "accurately" decipher the assigned cyl KS mic signal post background noise threshold levels for presence of cyl knock.....thus needs to be set in the strategy's VID block to match the fuel's AKI rating being used........
Note: If anyone has used a SCT X4 tuner & looked under "Options" listing when connected to ECU thru OBDII port, the 1st or 2nd item you see listed is the fuel octane selection (87, 89, 91, 93)....this is set in the strategy calibration's VID block to tell the ECU the fuel AKI rating being used.......typical OEM setting is 87 unless this is physically changed then written into ECU......FYI.
IMHO, Ford chose to not use these strategies to their fullest potential but instead chose to set it all up for "safety & reliability purposes"......for public consumption\warranty concerns & marketing strategies to enhance sales.........performance not being the main focus.
Now w\ any 3rd parties involved (like Shelby & Roush), this tuning may be different than what Ford chose to use so you'd need to get w\ the 3rd party to find out where\how all this is set\setup.......unless the means to check this directly for yourselves is available to you.
As for all Coyote Copperhead & up ECU's, this capability is enabled by default......called OAR or Octane Adjust Ratio.......a big leap in capability vs the SO ECU's.
Enough for now..........
As for the OP, I also think either a bad batch of fuel is most likely culprit........or theoretically spark advance getting momentarily cut causing the engine to work harder (using more air\fuel to do the same work thus putting out more heat than it otherwise would have if spark advance timing was normal at the same desired engine load)......which could be the result of a bad batch of fuel.....or just AAT causing the IAT\ECT to exceed a threshold depending on the load\RPM at the specific time of use thus causing the ECT to respond more than usual.
Only way to know for sure is to have had a datalog running to record all then check it to find the actual culprit(s). So, the old adage goes........"if it ain't broke, don't fix it".
Hope this helps.
My 2 cents........................