OP mentioned the ultimate solution in their comment, it's Headless CMS (provide content) + fully custom frontend.
A couple of months, I used my own tool (Maglev) when revamping an e-commerce site of a client who didn't have a content management system to edit the marketing part of her site. So I sliced the site into editable "Maglev" sections/blocks. The result was great in terms of editing experience BUT a couple of months later after the launch, my client hired another marketing person with HTML/CSS "skills" (I'd say 101 HMTL/CSS level). And I had a hard time to convince her that it was a bad idea to write HTML/CSS code herself but instead to let me (or another developer) write the missing sections she wanted.
A solution would have been to add in Maglev some kind of dev editor like in Primo. However, based on my long experience, you really don't want your client to touch the HTML/CSS of your site. And I don't believe in the "you break it, you pay for it" mojo or at least this is not the kind of relationship I want with my clients.
On a higher level, any kind of CMS has the same issue. For instance, I helped a company with a broken Webflow site and it was the typical issue: a designer built their site and later the marketing person tried to "improve" the UI and broke everything.
Certainly, and in the same vein you don't want your client touching the design of the site. Clients can barely write good copy, much less make good design decisions. My freelance projects go a lot more smoothly now that I can hand off the site to the client knowing that they're restricted to adding/removing blocks and updating content (and that they can't see the 'open code' button).
(or if you just have general feedback or learnings from your own experience, I'd love to hear that too!)
Best of luck on your CMS! I'm always intrigued by what others build - so please don't take my experience as any sort of criticism - I'd love to see your project succeed!
Ideal world is a CMS that allows clients to easily change the HTML without code. That way it loads fast, has great SEO and stops developers re-inventing the wheel.
That was the reason I built https://versoly.com/ (Website builder + CMS), why does the client have to contact you to change the background color or add a new section?
A headless CMS in our case would be a better approach. Simply provide the content and let a few professional folks code it up to match designs. Not everyone has that luxury I realize - so there's definitely a place for this type of CMS. I'm just pointing out how it can go horribly wrong.