I feel the same as you on this. There's always something not quite right with one editor or another. I did start down the custom path by finding a very bare bones editor, so that I want starting from scratch. I was able to make changes and get it to good enough, but what I found is that there are lots of simple things that aren't always so simple. Things like auto-indenting for example look simple but can be fiddly, especially if you've mixed tabs and spaces. I might come back to it but for now, the other editors are also good enough.
I wrote my own editor, many years ago. I have been using it every day ever since, for all the coding work I do. It is a terminal program, so maintenance has not been burdensome.
https://www.github.com/marssaxman/ozette/
If I did it over again, I might use a rope instead of a line array as the central data structure, but it works well enough that I've never bothered to change it.
You can check out the book "The Craft of Text Editing" by Craig A. Finseth
Related: I wrote my own task manager which I've been using and maintaining 20+ years straight.
I made one using fltk for rust, but I only use it for my diary. They have an editor sample to get you started. I think its not a bad choice if you like rust. Like a true nerd, I also integrated my own homebrew scripting language.
Many years ago I wrote a "bespoke" blogging CMS just for a friend of mine. (The big innovation I'd wanted to try is JavaScript that would preview your post while you were typing it in...)
What I learned is it's fairly simple to make a text editor - but there's also the occasional fiddly little bug that has to be sorted out. (It could've also had security holes -- it was protected by obscurity...)
I was frustrated with downtime at my blogging site at the time -- but in the end I just switched to "live-editing" my blog posts directly on the server using Pico.