I would advise against this, because old Mac hardware does not support modern macOS and I'm about 99.9% certain brew will not run on anything other than the latest macOS (by their design). You may have some success just using their Formulae to compile everything you want from source, but at that point, I think things have become "a project" versus the shiny BSD approach
An alternative perspective is that having an old Mac is fine minus the "plug in some Ethernet," since the Internet is the biggest attack vector in that discussion