Simulations and Studies of Electron Beam Dynamics under Compton Back-scattering for the Compact X-ray Source ThomX