IMHO its just easier to have more than 1 bike.
could you have "one bike to do it all" (swapping wheels, tires, perhaps handlebars)? I guess. but then youre swapping stuff between rides. IMHO, too many variables and just not worth it.
personally, I only need 2 bikes: mtb and gravel bike. the mtb does what an mtb does and the gravel does the mixed surface rides (fire roads, nontech singletrack, road, etc.) and doubles as a road bike. If I am doing a pure road ride I'll just pump up the pressure significantly more than a gravel ride. I dont even switch the tires. i dont care that the knobby cross tires are slowing me slightly.