Note, I didn’t read 99% of this topic. I just want to point out that back in 2016 @jonnydev13 already created a general scene rule in Javascript which I later translated to python for openHAB 2.x.
Configuration of the scenes is done by means of a JSON object which defines the target states of the items in the scenes. When selecting a certain scene then all items are set to the configured state for that scene. The reverse is also true, so if all items match a certain scene then that scene is activated (without triggering any item update since they already have the correct state).
These two linked topics may provide some inspiration.