Autoscaling has nothing to do with NixOS or Docker. This is just the feature of cloud backed applications.
However it is true that the best results are achievable using immutable infrastructure, but you do not need neither of these tools to achieve such. Instead you can build your own AMI (using Packer) and then use AWS CodeDeploy to deploy your application ...
You hint in the title about immutable infrastructure, so it sounds like you already know the solution: don't change existing servers, but bring up new ones with your changes, switch over to them, and switch back to the old ones if necessary.
Theoretically any of the standard config management tools can roll back by simply checking out a previous commit and ...
Some articles, including this one give some arguments why docker is popular:
In a nutshell, here's what Docker can do for you: It can get more
applications running on the same hardware than other technologies; it
makes it easy for developers to quickly create ready-to-run
containered applications; and it makes managing and deploying