There are commercial cat cages a person can buy that would give ample room for the cat to wander around within that would also give the cat a high perch to sit on and look around.
Joining it somehow with the apartment would facilitate this, otherwise how do you get kitty to go in?
If you need to keep a cat in a cage like that, you shouldn’t have a cat. While cats can be either indoor or outdoor animals, they have their dignity and they need their freedom.
While there are exceptions, most cats are perfectly safe in situations like the one shown in the picture. Providing, that is, that their pet humans don’t freak out and try to “rescue” them.