Welcome to HCM
It is good that you are going to gym and working out but your weight was 127Kg.
After exercise you loose water and electrolytes so keep yourself hydrated during exercise also, loose motion
may be related to some kind of infection to GIT like Amoebic or Bacterial so, just use potable water and get a stool test
if any thing abnormal it can be treated by simple priscription medicines.
You can carry safe water to Gym,that is one possibility?
If you eat less and exercise more and loose motion can make you very weak,so kindly take advise from adietition and reduce calorires and type of food you take,some times some supplimentation products are used and they are the cause of loose motion so kindly check that.
Please continue to exercise but get yourself evaluated medically that everything is fine.
Good luck to you