It’s fun to reinvent the wheel but I promise you all WordPress agencies have solved this already. For example look at VVV.
Even when I was a WP developer, none of my personal websites were in WP, they all lived on static hosts that needed zero maintenance.
Which almost every serious WP designer-turned-theme-developer I know uses.
(I personally use my own simplified Vagrant package management scripts with some ssh_config integration hooks because I work on more than WP and value standardisation across VM environments more than I value the features Local adds)
https://developer.wordpress.org/block-editor/reference-guide...