The question is about measurements in real world, not about simulations, am I right? If this is the case, there is an established technique and instrumentation for doing such measurements. The generic name of an instrument commonly used in laboratories and field testing for this purpose is Vector Network Analyzer. The article describes the operation principle in details and contains references for further research into the subject.
There is another kind of applications (audio environment acoustics, power grid control) where you need to measure frequency response of the system in real time (on the fly) -- or, admittedly, to do relatively instantaneous measurements of rapidly changing frequency response. In measurement of this kind, if the device under test (DUT) is linear, you can leverage the impulse response/frequency response duality, implementing pulse testing of your DUT. To be able to test a non-linear DUT, you can lower the crest factor (peak power/average power index) using a pseudorandom noise (as maximum length sequences that you mention) instead of single pulse stimulus.
But, to measure frequency response of "simple" networks "like an RC-filter", you need not go into such intricacies and can do with an ordinary lab equipment.