Great news - what you're wishing for mostly already exists[1]. The relatively new sysupgrade server and attended-sysupgrade clients automate the process of creating custom images matching already installed packages. After the breaking network config change a few years ago, it's now pretty safe to keep config files and ssh keys while flashing an upgrade image. The end result now is that I can seamlessly and painlessly update my OpenWRT boxes with just a few clicks or commands, despite loads of installed packages and config files.
[1] https://sysupgrade.openwrt.org/
p1mrx|2 years ago