We might have had to suffer it either way. Remember, RFK apparently approached both Kamala and Trump offering to endorse whoever let him be health secretary. Kamala reportedly refused, so good for her. Trump obviously didn't. But there are a lot of MAHA/vaccine skeptics around the area I live, more than I was prepared for (judging by pre-election lawn signs before RFK dropped out).
It's possible RFK's loyalists were enough to effectively pick the president. I think we all underestimated how deeply anti-science contrarianism has burrowed into our neighbors and communities.