In every digital sampling system you'll need anti-aliasing filters.
That is completely false and doubly so because there is nothing special about digital versus analog sampling systems.
Sample rate has nothing to do with -3dB bandwidth. Some old examples of this include both analog and digital sampling oscilloscopes, sampling frequency counters, and especially sampling RF voltmeters which make accurate RMS measurements into the GHz range using sampling rates of 10s of kHz. These instruments have zero anti-aliasing and input bandwidth is determined by sampling gate width, any circuits before the sampling gate (usually none), and ultimately physical construction.
Digital storage oscilloscopes can make the same measurements these instruments do in the same way within the limits of their input circuits irrespective of their sampling rate. (1) This reflects the chief difference between "sampling" and normal instruments; sampling instruments have high bandwidths because they move their sampling process to a point earlier in the signal chain.
The older DSOs either didn't care (Tek2230) or had such a high sampling rate they could use a Gaussian roll-off frequency response and still had enough headroom at their maximum samplerate (TDS200 series).
Did not care pretty much sums it up. Anti-aliasing filters are not required for oscilloscope applications and actually conflict with them. These old instruments did not include anti-aliasing filters because they were not needed and would detract from their performance and intended applications. Instead of adding anti-aliasing, functions like peak detection, histogram acquisition, and huge record lengths (LeCroy) were added.
However if you want to get the maximum bandwidth versus samplerate then the golden spot is to have the bandwidth at fs/2.5 where sin x/x reconstruction still works well. That gives enough headroom to have a reasonable anti-aliasing filter without too much 'funny' side effects. The ENOB on most scopes is likely 7 bits (or even less) so 42dB of attenuation at fs/1.7 (*) is enough.
Fsample/2.5 is an arbitrary criteria. At various times it has been Fsample/4, Fsample/5, or Fsample/10. Fsample/2.5 does *not* give nearly enough headroom for any anti-aliasing filter with acceptable transient response because the transition band between the -3dB bandwidth and Nyquist frequency is just too small even for only 8-bit resolution. It can work for audio but not for a time domain instrument and even audio applications now use much higher oversampling ratios with large transition bands. (2)
* Say you have a 1Gs/s scope. fs/2.5=400MHz bandwidth. FNyquist=500MHz. Because the anti aliasing filters wraps around the nyquist frequency you'll need at least 42dB of dampening at 600MHz (in the analog domain). 600MHz= approx. fs/1,7
I wish you good luck making that filter. The practically unknown example I gave was 24dB/octave and that was only at 20 and 100 MHz. There is a reason elliptical filters typically used for anti-aliasing are absolutely *not* used in time domain applications.
The original question involved compensating the bandwidth in software and high end DSOs, especially high bandwidth ones, do exactly this. I think Keysight has discussed this issue in depth. The frequency and phase response is tested during calibration and the correction factors are used to produce what I assume is a FIR filter to correct the response.
But no software could correct for the response of the anti-aliasing filter you are suggesting. The poor transient response would overload the digitizer on peaks and the response would shift too much with time and temperature. Even DSOs which no extra filtering have this later problem which is why bandwidth and rise time specifications are qualified to a specific temperature range. True anti-alias filters would make this much worse.
(1) DSOs which operate on their processed display record like Rigol cannot make these measurements which is actually a step back from analog oscilloscopes which can. Unless special care is taken, the processing to produce the display record destroys the histogram of the original signal.
(2) Many disagree that this works or ever worked for audio but the question has become irrelevant since this is not done anymore.