Replace systemd-machine-id-setup with alternative?

...I'm curious if there's a way to set an alternative way to generate the /etc/machine-id file...

Per the machine-id manual page,

...Otherwise, the value in /etc/machine-id will be used. If this file is empty or missing, systemd will attempt to use the D-Bus machine ID from /var/lib/dbus/machine-id, the value of the kernel command line option container_uuid, the KVM DMI product_uuid (on KVM systems), and finally a randomly generated UUID.

And also, towards the bottom of the page,

The simple configuration file format of /etc/machine-id originates in the /var/lib/dbus/machine-id file introduced by D-Bus. In fact, this latter file might be a symlink to /etc/machine-id.

Therefore, it is also possible to set the machine-id using dbus-uuidgen, as can be seen in the following answer:

  • https://unix.stackexchange.com/a/84793/247886

Per the dbus-uuidgen manual page,

If you run dbus-uuidgen with no options it just prints a new uuid made up out of thin air.