Your problem: not enough usable wires
The prior installer couldn't get /4 cables, so they bodged together two /2 cables to get the wires they needed going up to the switch. Thing is, that's no good under a strict interpretation of NEC 300.3(B) and 310.10(H), as AC current creates a magnetic field inside any loop of wire. If all the wires carrying a given circuit's power out and back are in one cable or conduit, that magnetic field is safely confined in that cable or conduit and thus is harmless.
However, if you take power up in one cable and back down through a different cable, now you have a magnetic field between the two cables. Any ferrous metal, such as a nail, staple, or piece of box wall, that separates the two cables will get eddy currents induced in it by said magnetic field, and these eddy currents will be dissipated in the metal part as heat. (Induction cooking relies on the same effect, just at a higher frequency.) As a result, it is only by way of luck that your prior setup, with 3 hots and 1 neutral split across two /2 presumably-NM cables, didn't set something a-smoldering.
So, given that we have 3 loads and two usable hot/neutral pairs on our hands here, we're left with a choice of which two loads to pair together. One could pair a lighting load with the fan, but that limits your ability to control the lighting in the future, as now that light can't be dimmed at all, nor can the fan be put on a humidistat. The other option would be to put the lights all together and have the fan by itself, which is what we're going to do here as it gives us more flexibility with controls and also allows more sophisticated fans with built-in sensors to be used.
First, we rework things in the switch box. The pilot-light is removed, and the white pigtail that connected to the pilot-light is connected to the white wire that formerly connected to the switches with a wirenut after it's been trimmed down to remove the inter-switch part. This gives us two switched-hots with their own separate neutrals going onward, one for the lights and the other for the fan. We'll also need to tag which cable had the original neutral in it so that we know which cable is which going up to the fan/light.
We then unwire the ceiling light/fan/heater mess, tagging the cable with the original neutral, as well as the cable going onward to the vanity light, for future reference. We'll be putting this back together when the new fan/light goes in.
As to controlling this all
The key to our controls is an Enerlites (sometimes rebranded as Topgreener) DWHOS. This device is a combination humidity and PIR occupancy sensor, designed for bathroom exhaust fan and light control. In your case, the black and blue wires get connected to the incoming hot in the switch box, while the brown wire (fan hot) goes to the untagged cable's hot wire and the blue wire (light hot) goes to the tagged cable's hot wire. The sensor's white wire goes into the neutral bundle, while the sensor's green wire is capped off since there are no grounds in the box and this does not appear to be a conduit or BX job.
If you want more finesse than simple ON/OFF control of all the lighting together, that's where things get tricky, as most residential "smart switch" gear doesn't play nicely with occupancy sensing, and there are no dual-relay sensor dimmers either. One can pull dimming off using a 3-wire fluorescent slide-to-off dimmer such as a Lutron Nova T NTF-10 by powering the dimmer via its switched-hot, capping off the normal line wires, and putting the lights on the dimmed hot, but that's not exactly the intended use of such a dimmer, and it's also not cheap.
(Even if you left the bodge-job wiring between the boxes alone, you'd still be in a bit of a pickle. One could theoretically use a SensorSwitch SweepSwitch SSPL to derive a vacancy zone for the vanity lights from the occupancy-sensed ambient lighting zone, but I'm not sure what'd happen if you switched the line-hot going into a tapswitch-type dimmer like a Lutron Maestro, and you wouldn't want to use a conventionally switched dimmer due to issues with the switch state not reflecting the state of the light.)
Now, to the fan...
The good news with what I'm proposing is it keeps all the brainpower in the wallbox, which means that you can use a plain old "dumb" fan/light fixture instead of needing to get some fancy humidity-sensing bath fan. You'll just need to make sure that the fan and light have separate neutrals so that all the current returns down the correct path.
When wiring your fan up, the two hots from the tagged cables get wired to each other and to the fan's light-hot wires, while the tagged cables' neutrals are treated similarly. The hot and neutral in the non-tagged cable get connected to the fan's fan-hot and fan-neutral, and any earth wires the fan provides are simply capped off. Note that if the fan sits over the shower/bathtub, it'll need a deadfront GFCI at the switch box for protection; this is possible, but tricky, since the DWHOS does not document which hot it derives its own power from. (It also means you won't have room for anything more sophisticated with regards to lighting controls.)