How to redirect if a page doesn't exist with Apache

Over a decade ago, I decided I wanted my article URLs to live at my site’s root path / instead of a subpath (like /blog or /articles) “for SEO purposes.” That made sense when I had a few dozen articles and hosted with WordPress. Today, I have nearly 3,000 articles generated as a flat HTML files with Hugo, and navigating my file system on the server is an unruly mess!