I think your suggestion should usually work. Depending on the "..." ! -- I don't know if you can redirect grep's output onto its input file without issues.
If you have carefully configured your ssystem_minor.ini and losing it would cause a big headache, make a copy first. But the warning is functionally harmless. We kept the entry for a long time, just in case you use the same directory with an older version.
Note that much older versions of Stellarium (2018? I cannot say by heart.) may not work with this newer file.
Regarding running older versions in general, rather set STEL_USERDIR for the newer version. Again, I cannot remember when I introduced STEL_USERDIR, very old versions may not know it. Check the User Guide that comes with the old version to see what options were available. If there is no user guide for that old version (pre 0.15?), the envvar was unknown.
I think the config.ini is compatible since 0.16 or even earlier, with new options just being ignored by older versions. A few have been renamed and thus are ignored by the "wrong" version. What I don't know are the user-downloaded star catalogs, here we have some files that may be incompatible with very old versions (0.13 or so?). If in doubt, yes, use a separate --user-dir.