It won't be possible to administer the exact quantity of electrolytes but in any case one can help the horse to recover a good percentage. Also the feed at each vet gate contains mineral salts that can further help the horse to recover. For example, hay contains potassium, and if it's alfalfa it will also contain calcium and other electrolytes. Water alone doesn't contain many, but it is vital to re-establish the balance of fluids. A way to minimize the loss of electrolytes is to wet the horse at every possible occasion.
Water helps to disperse heat, minimizing sweat, thus the loss of salts.
It is quite easy to replenish these useful elements, and the market offers a number of combinations. However these products can vary in their composition, so it is important to read the labels carefully. Almost all of them contain sodium chloride and potassium chloride. Just as many contain calcium in various forms, calcium lactate, calcium glutamate or calcium carbonate. It might be more difficult to find magnesium.