Those are two different things
being a self-contained wad of hardware
Steam Deck checks this, but so do laptops, raspberry pis and smartphones.
unable to be upgraded or repaired piece by piece.
Again Steam Deck is almost as upgradable and repairable as a laptop, and more repairable than a raspberry pi or a smartphone.
So that definition of console doesn’t work, otherwise raspberry pies, laptops, and especially phones would also be consoles. The differentiating factor is locking of the system with the hardware, in that sense Apple is more “console-like” than non-Apple competitors. Also The primary function of a gaming console must be gaming.
With those two extra points the Steam Deck hits one but misses the other. It is primarily for gaming, but the system is not locked down, you can change it how you want and even remove it entirely and put a different one.
So with any definition you can find the Steam Deck is not quite a console, but it does provide a console experience, so it’s in a weird space.