You can setup a Mac without an Apple ID. To be honest iCloud is garbage. Almost all Mac App Store apps are available without the App Store.
I remember having a garbge Apple id just to use xcode. Back when I was desperate enough to work from a company that only issued macbooks.
And I don't see an advantage to have an Apple ID setup if you want a Mac Mini Server. All things you might need are downloable through brew.