How to programmatically define and load sections, slots and blocks for a homepage (or any other page)?

At the moment I have found something like this :point_down:

Is there any other way to do this?
Is there any documentation for such a functionality?

Here is an example for an own Demo Content Plugin:

You can run it with the AppflixFoundation Plugin
https://docs.app-flix.de/en/foundation/demo-installer/

Or take this (is more simplified) with the moori Foundation Plugin

https://docs.moori.net/en/MoorlFoundation/demo-assistant/

Thank you @Moorleiche