Not at all to defend Meta but "a feature that allows software developers to test applications" is a dubious definition of localhost. I also can't come up with a better one.
It's not a definition, but it is an accurate statement.
“A loopback network interface” or “A interface that refers to the same host”.
“A network interface which allows processes on the same internet host to communicate without the need for a network connection”
Here is the explicit definition of localhost.
The term "localhost" refers to the default entry in all modern operating system host files. By default modern operating systems provide a hosts file that provides domain name resolution without reliance upon the Domain Name System (DNS) protocol. By default these host files typically ship with one entry, a domain named "localhost" that points to IPv4 loopback interface 127.0.0.1.