Can Packer be used to create a macOS ISO to setup a MacBook Pro?

Simple question: Would Packer be a good tool to create an ISO image for installing macOS onto a MacBook Pro? I have a new M1 Max MacBook Pro but have not started using it yet because I want to build it up from bare metal using scripts.

I have as a .dotfiles repo although I have not maintained it quite as much as I wish I had, and I never really trusted it to build a machine from scratch I just used it as a resource for the scripts I needed.

But since I’ve recently been working with Packer to build Windows VMs to run on macOS it occurred to me that maybe Packer would allow me to finally formalize my .dotfiles into a bootable ISO that I could use to automate my MBP setup and/or reset my MBP whenever I wanted to start over clean again.

if this will work, will I need to be using the same version of MacOS on the host as in a VM guest, or can I use different versions? I assume the latter, but don’t want to assume and be wrong.

If this idea makes sense can anyone suggest a best approach? I have the latest Parallels, and an old version of VMware Fusion, which I could upgrade if needed, and of course I have VirtualBox too. I also have Carbon Copy Cloner and a Synology NAS with plenty of available free disk space, so I have pretty much any hardware and software I need to make this work, assuming it can work.

But I’d hate to spend a lot of time on this only to find a roadblock that it is not viable. If it is not the best tool for this, any suggestion on an alternate tool? Would Terraform make sense?

Than you in advance for any help you can offer.