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

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

Thank you @Moorleiche