No, because Moodle has no way of knowing which differences (between the defaults in the file and the configuration in the database) are due to local configuration changes and which are due to changes in the defaults. You could, in theory, write an upgrade step that directly alters the role capabilities in the DB (or via an API call), but that could be bad if the site admin has already customised the role capabilities to their liking.
General developer forum
Re-apply capabilities from db/access.php
This discussion has been locked so you can no longer reply to it.