We're also talking about maybe 30 seconds of work per project to edit a hosts file. Someone who knows their command line will be able to do it in 5 seconds. Multiplied by 20 projects, that's still only 2 to 10 minutes of work every year.
I personally use localhost for everything and just work on one thing at a time. I never mess with hosts.
1. https://davejamesmiller.com/blog/installing-dnsmasq-wildcard...
2. http://mayakron.altervista.org/wikibase/show.php?id=AcrylicH...