Thank you, Rich, I tried it but it does not resolve the problem. In the meantime, I have discovered that iMovie failing to export the movie to MP4 is due to the VTDecoderXPCService, which is in inherent program for exporting the file. This program takes up all the app memory available (I have 40 GB and it goes well beyond this), up to the point that VTDecoder stops, which automatically stops the exporting and gives a 'failure' message. I tested this by stopping VTDecoder manually in the activity window and it did indeed make the export instantly fail.
The movie I had made is about 1h30m long and is composed mainly of very short takes (2 to 4 seconds). Maybe this is the reason why VTDecoder takes up that much RAM-memory, I don't know for sure.
Anyway, I did manage to export the movie in three parts of 30m each, in 1080p quality. I will now try to import these again in iMovie and 'stick' them together in one movie, which I will export again. A hustle, yes, but if it works, this might be the easiest of solutions, I imagine.
All comments and suggestions are, of course, still more than welcome.
Thanks a lot !