So I've tried it again and could trigger it again. But I'm not exactly sure what it is. So i just got the yellow key first, didn't use the elevator and walked back manually. Then i walked into the room with the blue key, but didn't kill every enemy. Then inside the room i walked just random near the blue key and after a while (might be 2 minutes or something) the wall goes down and I'm stuck. I'm using GZDoom without any mods or something.
Edit: Ok it has nothing to the with the enemies or yellow key. And it doesn't seem time based. I just walked behind the pedestal, run out and in again, after 2 attempts it just closes again very fast. I'm still not sure what exactly triggers it.