Congratulations Juan on a great race, PR and podium performance. You were so close to breaking sub 5 hours. Very impressive!
That said, it seems that your break down around mile 11 or so was a pacing issue. I will compare it to ‘hitting the wall’ in a marathon since it’s prime road racing season and many of my athletes are training and racing for marathons now.
If you pace properly, you never ‘hit the wall.’ However if you pace even the slight bit too fast (5-10 seconds per mile or 1-2 HR beats), it wears you down and you hit the wall, like you did in your race. However with proper pacing, this shouldn’t happen. Of course it’s a work on progress because you have to factor in both your efforts on the bike and run. The swim can play a role as well if you are not an efficient swimmer.
You mentioned needing more running endurance. This will help. Obviously the more experience you have racing at this distance, the better you should perform*. However I put an asteric because if you don’t pace properly, you can have all of the endurance in the world and still have the same outcome.
Anyway, good luck with your R&R ahead! It’s well deserved!