Export and import modules of an installation
It sounds like you are describing two kinds of workflows.

One way is to use Features - where you package functionality into modules. In your case, you would create a Feature, select modules as dependencies as well as any configuration you want to carry forward. When the feature is enabled, all those modules are enabled.

Another way is defining dependencies with Composer (8.x) and combine that using Features and build tasks to automate this further, where nuking and reinstalling Drupal returns to the same state, kind of like an install profile in a sense.