How can I access the same account (and files) from either of two Macs?
Yes, the same is possible with Macs.

Usually you would create such a setup using macOS Server, which includes these features. macOS Server costs $19.99 on the App Store.

This will require you to have either a seperate dedicated server, or assign one of your existing computers to also be a server. The server must be running in order for you to be able to login with such a "shared" account on other computers.

You can also setup this manually, similar to a Linux setup:

This would require you to have some sort of directory setup in order to share the account itself across computers (i.e. typically OpenDirectory or Active Directory - that is variations of LDAP). In your very limited setup you could also manually setup your account on each Mac.

In addition to this you would need a NFS file server to store the actual contents of your home directory (i.e. all your files) on.

The performance of either solution in terms of read/write speed is comparable to the Linux solution, as it is really the exact same type of setup.