I am a heavy sweater and former heavy cramper. Thankfully, cramping is quite infrequent now. The two key elements of my solution have been training and proper electrolyte intake.
In my experience, cramping has been driven by substantial ramp in volume and/or intensity. Some folks can tolerate a ramp rate of 5-10 TSS/day each week (volume). Others like me, are closer to 2-4. Similarly, progressive ramps of Time in Zone - how many minutes you spend in each of the upper levels of intensity (sweet spot, threshold, VO2, NM) as compared to prior weeks can effect cramping. As fitness improves episodes of cramping decreases.
Also, making sure I have taken in sufficient electrolytes is particular helpful, especially on hot days or where the effort is going to be particularly hard (e.g. 350-450 TSS endurance day or large # of VO2Max+ intervals). Prior to the start of a workout I will typically start with 2x Hammer Endurolyte Extremes and later take 2-6 more depending on length of workout, intensity and heat. Through experience I have dialed it in.
FWIW: Pickle juice has been found to stimulate the TRP gland in the rear of the your mouth known. I have found it to be effective. However, it is quite inconvenient (you need to carry around Hammer flasks in your jersey pocket). Training and electrolytes have become better long term solutions for me.