Finally got the ESP32-CAM working
This was a headache. The RHYX M21-45 camera seems not to be compatible with the usual Arduino libraries and I had to do too much googling and trying advice from AI (to no avail, surprisingly). Finally I got it working by actually downgrading the AI Thinker ESP32-CAM library to some previous version (I think the 3.3.0 did not work).
It looks like a mess, but it works. I'll have to 3d print a nice enclosure and I'll probably use this as a very simple timelapse camera - I set it to take a picture every 30 minutes and send it my backend API endpoint.