Absolutely DO NOT take electrolytes in pill form while fasting! Electrolytes like potassium (in particular) are caustic and will cause lesions/ulcers if not taken with food. In an empty stomach the pill can just lodge in one spot and spill its contents there.
It’s a major concern, and the reddit and discord are littered with stories of people ending up in the hospital.
It’s such a concern, that in the US, potassium containing tablets tend to be limited to 99mg (without a prescription) because of these issues.
>First, the FDA has ruled that some oral drug products that contain potassium chloride and provide more than 99 mg potassium are not safe because they have been associated with small-bowel lesions [19].
<https://ods.od.nih.gov/factsheets/Potassium-HealthProfessional/>
It might be okay to grind them up and dissolve them in water to take. The only issue, is that they may not dissolve because to protect your stomach they may be formulated to be slow-release. So without knowing more, it’s best practice to just avoid it and use something like lite-salt which is cheap and readily available.