This unfortunately is not that easy because not all characters are available in filename
This proposal is too similar to Use H1 or front-matter title instead of or in addition to filename as display name
which at least is a bit more feasable.
As mentioned by @mgmeyers, an approximate solution is the plugin Plugin for keeping the filename and first heading of a file in sync