If you think you will run out of steam at altitude… buy a truck with a higher rating.
I have to assume you have the non turbo-charged version (not the Ecotech) of this truck. You don’t say, and you got the engine size wrong, it is 3.5 liters so your tow rating is right on the limit at 5000 lbs. Gross combined weight of truck and trailer is 9400 to 9500 lbs depending on options.
The trailer may have a 5000 lb rating but how much did it actually weigh? And how much cargo was in the bed of the truck? Combined weight is 9400 to 9500 lbs so with the 5000 lb trailer that only leaves 4400 lbs of truck. That is what the truck weighs empty. I’d bet you were over-gross with the truck and trailer.
It pays to read the fine print!