As a shared-hosting user with WP sites, I also faced lots of 524 and related CF errors. I still do to a lesser extent.
One thing that helped me was that I’ve realized that when editing, customizing etc, right-clicking to “Open link in new tab” is your friend.
Since WordPress sets its dashboard links to open on the same tab, this generates lots of unnecessary reloads of the main page while shuffling between posts and pages to be edited.
And there are many plugins that open JS, CSS and other files while you are visiting the WP Dashboard and its subpages.
Besides opening pages/posts in new tabs on the backend, one thing you can do is visit the WP dashboard with Dev Tools open, and check which plugins are loading unnecessary JS/CSS files, then try to replace them with better-behaving alternatives.