Taillights sometimes work, then they both go out, and come back

All the lights except for back up and headlights come together/ split off from the turn signal switch. Id start there if you're SURE the grounds are good
The park/ tail/ cluster illumination has nothing to do with the TS switch or the TS switch harness connector

Only thing near the TS switch are the brake/ TS lights. Of course they share the same harness down and past the left kick panel connector and on to the rear of the vehicle