I don't really see a properly done version of witch as a subclass for any existing class, however, it's also a bit of a stretch to make it its own full class.
Rather, my favorite approach is to roll witch as an archetype into a broader general primal caster class that includes other concepts like witch doctors, shamans, oracles, seers, hedge wizards, animists, theurges, charmers, etc. Apart from covering a nice smattering of concepts not nearly covered by a standard class, this also gives us a nice thematic analogue to the barbarian
IThat's why the occultist by kibblestasty is my go-to for something to build off of. What I don't love about the Occultist is the lack of a single unifying mechanic other than rituals, which makes it feel like a dumping ground for things rather than a cohesive class concept. My version of this would include something like a Trance-based mechanic to mirror the Barbarian rage.