Connect wordpress with cakephp 4.2

Is there a way to create a template in wordpress that contains a view of cakephp? I need to create pages in wordpress that execute the different actions in the controllers of cakephp.
In the root directory I have the directories of cakephp and another one that contains the installation of wordpress.

Last time I tried this, it failed because there were a number of functions that both systems try to define, which kills PHP. But that was Cake 1.3. I think that with Cake being namespaced, the list might now be reduced to just part of the __ family, and if you don’t actually use those then it might be okay.

What I’ve done instead is to create a page in WordPress, not liked from any menu, called something like “cake_template”, which has a title of “[TITLE]” and “[BODY]” for the content. My Cake layout then pulls that page via cURL (cached, so you don’t do this on every page load), and does some search and replace with the actual title and content of the page being rendered. It’s not a super clean solution, as there are generally also headers that need mangling, but it’s generally pretty functional.

Think that’s possible did similar for CodeIgniter and WordPress.