The fact that you still get the timeout with Cloudflare disabled is useful because it largely removes Cloudflare from the equation. I also wouldn’t increase MaxRequestWorkers or PHP-FPM children any further until you identify which layer is actually saturating.
When the timeout happens, I’d capture the state at that exact moment rather than looking only at overall CPU/RAM. Check the affected account’s PHP-FPM processes, its CWP process/package limits (nproc, apache_nproc, nofile), Apache scoreboard, and the corresponding PHP-FPM slow/error log. Also compare pm.max_children against the number of active/queued requests for that pool.
One particularly useful test would be to run several simultaneous requests directly against the origin while watching the affected PHP-FPM pool. If requests begin queueing while the machine still has free CPU/RAM, you’ve found a concurrency/limit bottleneck rather than a server-capacity problem.
I’d also temporarily correlate the timeout timestamps with ModSecurity audit entries. That should help distinguish PHP-FPM saturation, account limits, Apache worker exhaustion and request filtering instead of changing several limits at once.
I develop CWP7 Turbo Manager, specifically around diagnosing and tuning this sort of CWP web-stack performance problem. Full disclosure: I’m the developer. It may be relevant here, but I’d first capture the PHP-FPM/account state during one of the 522 events—the numbers from that moment should tell us which direction to go.