RC anti-aliasing filter for a pulse train
Do you know about the Fourier transformation ? If not, look here.

The Fourier transformation relates signals described in the time domain (for example: a pulse) to their frequency spectrum, i.e. the frequencies they contain.

If your pulse signal has frequencies components above a certain frequency which you filter out (with your anti-aliasing filter) then you change the signal. Indeed steep edges in the signal result in high frequency components.

An ideal pulse or squarewave signal with rise and fall times of almost zero will have frequency components up to infinitely high frequencies !

You will have to figure out what you need, what are the rise and fall times of your pulse. If these are for example 1 ms (0.001 second) then the bandwith of this signal is in the order of 1 kHz (1 / 1ms) so a 4 kHz filter will not affect this signal much.

If the rise and fall times of your pulse are 100 ns you need a 10 MHz bandwidth.