I didn't had any weapons on me at the moment. Maybe I could've broken the door by throwing stuff at it, but I probably would've died of hunger before breaking it.
There's a way to softlock yourself. I entered one of the barracks near the hole while Kerfus-Omega was following me. He ran into the door and closed it behind me. Since the door opens only one way, Kerfus keeps the door shut. I haven't found any other way to get out so I had to reload my save.