Now, since the cooldowns don't line up properly, and heat will haunt you, you won't be able to stick to a set rotation. Or it's possible you could, but it'll mean a lowered damage output. So here's my priority, in order:
I'm going to have to disagree with you here. True, the 15s CD on Thermal Detonator means it doesn't really fit perfectly into a rotation given the 6s CD on PPA but even after a lengthy discussion with Odawgg yesterday about this and other pyro related topics, I still think delaying it slightly is not a terrible thing.
Comparing my best parse with yours at the 250s mark shows you used 1 more TD, 4 more UL and 8 more Rapid Shots, but I used 2 more IM, 3 more RS and 12 more PS and I more or less adhere to a fairly strict rotation.