The most efficient way is to use the command line renderer in multi machine mode. That will mean each machine will render the next un-rendered frame independently. You need to set the output module to a frame sequence, like png sequence, JPEG sequence, etc. and you need to make sure that "skip existing frames" is on. Then in a command prompt, type
/path/to/aerender -project ~/path/to/your/project.aep where
/path/to/… is replaced with the path to the aerender executable, and your project (dragging the files onto the terminal is the easiest way to find the correct path). On my machine the executable is
C:\Program Files\Adobe\Adobe After Effects CC 2019\Support Files\aerender.exe on a mac it will be
/Applications/Adobe/Adobe After Effects CC 2019/aerender.
Alternatively use the render engine and set up a watch folder. This is slower than the CLI renderer, but doesn't involve any CLI use.
Media encoder doesn't do multi machine rendering. Probably because if you need rendering speed enough to use multiple machines you don't want to be rendering with it anyway. It's about 20% slower than the CLI renderer.