Just for square wave generation, use a phase accumulator counter. A configurable value gets added to the accumulator every cycle of the 50MHz. In case of square wave, your output is just the most significant bit of the accumulator. The accumulator will wrap over and everything continues; at the same time the remainder of the phase is still kept and you'll get fractional precision. Scale the accumulator size as needed; it shall be at least 16 bits to accomodate divisor 50000; it may be as long as much precision you'll need. In case of 50MHz input and 16-bit accumulator, each configuration step is 762.9Hz. For 32-bit, you'll get 0.01Hz.
As always with fractional division, the pulse lengths might not be exactly equal; for example, the input of 419 will give you average frequency of 319.7MHz, but there will be pulses of 156 input clocks and 157 input clocks due to output not being multiple of input frequency.
As said, driving stepper motors at not very slow speeds is much more than just fixed frequency pulse generation. For better results, explore what has been done before.