If during revision process an author discovers and corrects errors not detected by reviewers, should the author inform the editor of these changes?
This is a straightforward question with a simple answer: correct whatever you find is wrong, even if it has not been raised by the reviewers.

I have an experience of more than 600 publications (see Google Scholar for instance) and have reviewed even more manuscripts as peer reviewer, editorial board member or editor, and it is commonplace to have the need and opportunity for improvements in a manuscript during the revision process.

Be candid, disclose the correction. Possibly don't say it was a mistake in the first place, but present it in a positive fashion, saying it is a correction or improvement in the paper.

In most cases reviewers and editors will be pleased by your self-reviewing effort.