Thanks all for the replies!
I solved it in the end by hooking the RESET pin of the OLED to a GPIO pin of the STM32F4 (J10A pin 7 on the midibox board) and a pull-up resistor, and then pulling the pin low in code for 1s at boot, to ensure the OLED module is reset properly.
I couldn't get any combination of capacitors and resistors to work. I noticed that I have quite a lot of noise on my 3V rail, caused by some WS2812 LEDs I have - even though they are running off a different 5V supply, I guess there is an issue with the common ground. Don't know if this was related. Everything else runs fine...
For future reference, I am using these extremely common (and cheap!) 0.96" 128x64 OLED displays, from ebay, such as this: https://www.ebay.co.uk/i/302104546088?chn=ps&var=600918131598