Is that a realistic example? Very few people including trained athletes would actually be able to expend 4000kcal in 6 hours without some nutrition. After the immediate glycogen stores are depleted in a couple hours your power output drops dramatically if you don't consume anything.
Today I just did a strenuous 4-hour hike on an empty stomach which based on my weight was about 2500-3000 calories. I drank about 100 calories worth of Gatorade, and I don't do any special diets. Just years of long runs/hikes.
Unless you’re keto adapted that is (i.e. being in ketosis for a couple of weeks).
When you're keto-adapted your body is used to running on your fat, and you won't experience 'bonking'.