I was towing my 5th wheel trailer on a highway and up an incline. Almost at the top of the hill a notification appeared on the dash screen stating, "low power mode". As I was on top of a hill, towing a trailer, on a highway, and with no available offramps, I coasted down the hill trying to find a place to pull off of the highway. At the bottom of the hill I heard a loud noise from the engine, noticed smoke in my rearview mirror, and lost all power to the vehicle including power steering. I managed to pull off to the side of the busy highway. I exited the vehicle and removed my kids from the car, moving them up a hill on the side of the highway as it was the safest place I could find. It was at that point I noticed flames coming from the right font front wheel well. I quickly opened my trailer, grabbed my fire extinguisher, and doused the flames. Had I not acted quickly the entire truck, trailer, and hillside would have caught fire. The vehicle is still at the dealership waiting on Ford Motor Company to approve the repairs. The vehicle has approximately 26,000 miles on it and is unmodified.