You have to keep an eye out for the “no more than two stopovers in continent of origin” rule. I think you comply. DOH as you know is “europe” for this purpose so keep under 24 hours each time. We did a very nice 23-hour “transit” in SFO-DOH-LHR which gave us plenty of time to visit the souk, have a massage/hammam, and go to the fabulous Islamic Art museum. Hand luggage only for the “transit” stop. Overnight in a lovely hotel within the souk.