Let me tell you all how one manufacturer does their RMS measurements. First, at a zero cross, sampling (magnitude) occurs for a half cycle. At the end of the half cycle (next zero cross) the sampling stops. The average is found and scaled appropriately to come up with the RMS value. So only half cycles are sampled. One waveform is only sampled every 40 cycles. Four calculations are made (total of 160 cycles) and compared to the trip level or displayed.
I can tell you there are other ways to calculate the RMS value but they are software intensive and well beyond the ability of your small microcontrollers (cheaper meters or controls).
Now you can filter out whatever you do not want (harmonics). The question is what harmonics are inlcuded? Out to the seventh, fifth, what? To me, it should include the fifth at least, although the ones I have come across filter frequencies above the fundamental.
Yes calculating the real RMS value can be done and is done with software. But let us not forget the old op-amp configurations (square, square root, and differential) that will spit out the true RMS value. So there are plenty of devices capable of calculating (based on amplitude measurements) the RMS value. Your expensive utility type relays have this ability as well as some low/high end panel meters. So doing RMS measurements is possible and is being done by several companies.