So, here's something weird. I decided to have a look at my O2 sensor (upstream). I have already replaced my downstream sensor when it malfunctioned due to damage. I unplugged the upstream sensor and ran the car. It still did the misfiring thing and threw a code, but only after quite a while...