Sure, but trying to put the limitations in place so that the VM runs slower is a ridiculous chore, whereas setting restrictions for a docker image Docker is a a few lines of trivially tweaked ascii. Running docker may be using a VM, but it's not a slow VM compared to mid-tier machines, something running at half the speed of the M1 is still running considerably faster than the target you're trying to hit, so just tell docker to slow down instead of trying to mess with MacOS behaviour.
Hence the mid-optimization: don't go "the VM's already slow, tweak that", just keep going and tweak Docker, it's almost trivially easy, and trivially replicated on any other machine should you need to either scale or hand off.
"put the limitations in place so that the VM runs slower is a ridiculous chore"
It's just as easy as tuning docker. Every VM gets resources allocated to it, that you, as a user, can customize however you want. Most major VM implementations have this for you to use today already. Just as replicable as tuning docker container parameters.
Hence the mid-optimization: don't go "the VM's already slow, tweak that", just keep going and tweak Docker, it's almost trivially easy, and trivially replicated on any other machine should you need to either scale or hand off.