0.0.0.0 is a better target than localhost, because it means the connection fails immediately rather than possibly timing out, and it won't accidentally succeed if you're running a local server.
The IPv6 variant (two colons, ::) is shorter still.
The reason I go with Safari Content blockers and /etc/hosts is because both of those solutions stop network requests before they even attempt to make a network request. uBlock is a good backup solution, but I want my computer to think Facebook doesn't even exist as a url, regardless of context.
For example uBlock won't stop iMessage from trying to load Facebook's inline media content when someone messages me a Facebook link.