When I see this mystery problem it is usually lack of calories.
I notice you didn’t have any numbers in your report of how much you ate and drank. This is often an indicator though not always. Ask yourself how many calories you actually got in. Also consider your power target, just because you picked a number and hit it doesn’t mean it was the right target. Your big brick int eh week prior was in cool temperatures by your own account. Was it the same temp on race day? These types of things show up late in the run, not necessarily in the beginning, unless you really blew it. So just because you hit your number, don’t be so sure that the power output you picked was correct.
Also you say your heart rate was under control as things started to go south. This is another rule O thumb. Heart rate is the same or low and pace is deteriorating, you are low on calories. Heart rate is high and pace is deteriorating, then it is heat and dehydration. In Iron distance you can also get both at different times.
Also, lack of calories will definitely make your legs hurt more. When depleted everything is worse, your legs hurt more, your neck bothers you more on the bike, your mental state deteriorates, you can tolerate less pain etc. All that stuff goes to hell.
You don’t have numbers on calories for the run either, the early parts of the run are very important in terms of getting in the calories.
And lastly, your account of the big brick, the bike was done on a cool morning and you had to dig deep at 15 miles into it. Please consider this. On that day, you had skipped the ride, ridden 80% of the bike and then not quite 2/3rds of the run and you are saying how hard it was at the end of the run.
I think there is the disconnect, at those distances you shouldn’t have been deteriorating, you should have been holding relatively steady. Of course relatively is a big word.
That’s the hard thing to do, we go out and do big workouts and figure well I made it through a 6 hour brick I am all set. But that’s not necessarily true, on race day you’d have another 4ish hours to go. So it’s not just that you did the race prep bricks, it’s that the race prep bricks kinda need to go with flying colors. If you finish it but you are struggling for the last mile of your race prep brick, then you need to adjust something.
The answer is there, review your race file and the race files of your big workouts leading into it and you’ll find the answer.