Additionally, your OS probably already natively hides files that start with a dot, so this is just a UI problem.
Please don’t “solve” this issue by moving files to a sub-directory. If anything, only leave non-config files there, it’s the obvious simple solution that most projects follow anyway.
I recently dropped my last shared hosting in favor of Vercel/Netlify and some content was lost. This solution wouldn’t work for me because the very reason why the content was lost is that I don’t want to pay for hosting I barely use.
A better solution would be an intermediary part that never changes — say, CloudFlare — that caches HTML pages forever, automatically adds a “Archived content” header to the page, and warns the author so that they can either allow the archived version or make it a 404/410 instead.
Nobody wants to maintain servers forever, but serving static/frozen pages is much easier and cheaper.
Do you really need a 100-million yacht and a 20-bedroom villa? No.