Yeah the in-body motor thing is only for the older Nikon lenses, I don't think AF for that is still supported if you're using Z-mount adapters. Nikon seems to have a few similar AF motor technologies like the canon ones in this article.
They ended up with all electronic contacts when they switched lens mounts for the “eos” series cameras though at the expense of not having backward compatable lenses. (I had a bunch of manual focus lenses at the time…) They had one “auto focus” camera for the old lenses the t80. (https://global.canon/en/c-museum/product/film115.html) but almost no lenses supported autofocus.
I think most of settings the camera sent to the older lenses (aperture primarily) was done mechanically.
The way these old cameras autofocused was pretty interesting. With some light passing through a semi transparent mirror onto different sensors.
Edit: this site has another page about autofocus. Quite extensive.
I have one of those mirrorless slrs now. The focus is amazingly good. Lots of software (eye detect etc). The focus sensors are integrated into the image sensor I believe.
All my nikon cameras focus with a semi transparent mirror on a specialized autofocus sensor. I even have an nikon film camera that has that cicuitry. You can't autofocus like mirrorless cameras with PDAF pixels in the main sensor with a mirror in the way.