That automatic library population used to happen in PIO version 3ish, but it got lost somewhere in the updates. It’s good to hear it’s back again.
I don’t usually specify the version of ModularSensors in my ini file, but it’s not a bad idea to do so. If you want to later recreate the set-up exactly, then it’s definitely easier if the version number is in the set-up. Most of the time for us, though, when something goes wrong in the field, we reprogram it with the newest version of the library rather than reprogram with the version it had had previously.