Rafaello, I can confirm that there is a problem editing 4K, 10-bit, h.265 on the M1 series of machines.
I was struggling with the exact problem you describe, and initially I thought it was the Filmconvert plugin. I spent a good deal of time conversing with them about the issue before I ruled it out.
In my case, I shot a documentary using the Sony A7siii in 10-bit, 4K, h.265 mode. The footage looks great and I had tiny files. Editing them is smooth as butter on the M1. HOWEVER when I go to export, the ram usage keeps climbing higher and higher until it hits some sort of maximum and the export fails. This huge RAM usage happens for exporting and also when rendering the timeline. I turned off all plugins, I'm now just using LUTs to apply grades to my footage, it still gets stuck.
The process using up all the RAM is called VTDecoderXPCService, when exporting it jumps up past 64GB on my 16GB machine. VTDecoderXPCService is the background process which also plays back h.265 HEVC content in QuickTime Player, it's a fundamental part of the OS which is responsible for decoding video. It is what talks to the M1's video hardware.
All my footage has LUTs applied, since I work in a log format. So this might be a factor. I will run another test later to see what happens if I remove them all.
In the end, I solved it by transcoding my entire project (a hundred hours of video) into ProRes using the Transcode--->Optimized feature. This was a disappointing solution, since one of the great perks of the h.265 workflow was that it was very portable, and I didn't need a lot of space. However, I can confirm that this solves it, for now.
I would encourage you to submit feedback directly to Apple about the issue, because sticking with the h.265 is an excellent, lean workflow for long documentaries and for travelling.
Feedback - Final Cut Pro - Apple