My last class A rv was 38.5' and had a V10. It only struggled one time and that was because I had stopped going uphill on the pretty steep grade. It had a tough time getting back up to speed on that one. And it's chassis buckled on it because of the extra weight behind the rear axle.
Diesels make 2 to 3 times the torque of gas engines, and when your towing the higher the torque the easier it is to tow. Thats one advantage.
Another advantage is the diesels are using chassis's designed for that length of coach. Pretty much all the gas rv's have to lengthen their chassis by welding on extensions that can extend out well beyond the rear axle. That extra length and weight behind the rear axle puts huge stress on the original chassis and continually tries to buckle it. Eventually it succeeds and the chassis right where the front slideout is buckles and the whole rv lifts up.
The only diesels I have seen do this were ones that people had towed a car on a flat trailer behind it and the added weight buckled the chassis. It is astonishing the amount of gas rv's that have the chassis buckled.
I drive a diesel now.