Exactly. If the camera knows the lens model/name then it can discern whether it's an EF or EF-S lens; regardless of age.
However, I'd assume there might be a specific flag in the lens identification to indicate if it's an EF-S lens; otherwise a brand new design of EF-S lens on even a current body (whose firmware was released before the introduction of that lens) wouldn't work correctly, as the camera wouldn't be able to look up the model number/name.
Probably a good test will be when someone mounts a few third party crop lenses on an EOS R; if they're detected as crop lenses then I assume there must be a flag (that should be set correctly by the third party manufacturer), as I doubt Canon would have added lots of third party lenses to the R's database.
It's easy (and expected) to update the camera's lens database from the online source. Just start up EOS Utility and plug in the camera. Do it when you buy a newly released lens.
It ought to be possible for 3rd party lensmakers to duplicate this process--to provide a utility and an online source for their own lenses that can be run in the same way to update cameras as EOS Utility does.