Deselect ALL object in the scene

Is it possible to select all objects in the scene? Now when I deselect all objects, although the last active object is not selected, origin it is still active.

here you can switch it on/off,
unfortunately it’s not a visibility option you can assign to a single object…,

that everyone selects, I don’t understand what you mean,
otherwise key a and deselect Alt a

Indeed, active, but NOT selected, the two are distinct states, so there will normally always be an active object, but that doesn’t mean anything is selected if say, you parse the selected objects in python.

Ok new example:

I have 7 objects in the scene. Two objects have a material assigned to them. The last active object has material.
Deselect all. In the outliner, the last active object is “selected”. When I want to create a new default material and not a copy of the current material, I have to mark the window without material to create a new one.

You can’t create a “new default material”, materials need to be assigned to something, the ycan’t be created if nothing is selected. You can assign a material to an object then delete it, however, if you then close blender and open it, that material, unless you gave it “fake user”, would disappear.
So to create a new material, you have to pick an object with nothing assigned to it, otherwise, naturally, you are adding a material slot to an existing object.

Easy way to show this, open a scene, delete the default cube, notice you no longer have access to a material tab.