That would be messy to do.
There is a company called Datapro that makes panel mounting RJ45 jacks with a lead attached, about 1ft, so these could be cut down to length etc. But still messy. That cable has to be supported, against vibration etc.
In one project I have 1cm PHY-CPU and then 1cm PHY-RJ45. So that should be good

In this next one, the CPU and the RJ45 are about 10-15cm (track length) apart.
What this comes down to, I think, is that for
either the RMII tracks
or the MDI (?) tracks I have complete freedom to create the correct transmission line properties. So surely it must be possible, one way or the other. Most of the distance will be on a single PCB, 1.6mm, and this can be 6-layer, so I can use an impedance calculator to do it correctly. I even looked at Rogers material but apparently this is wasted for these frequencies.
FWIW, this whole thing will be in a metal case, all six sides conductively anodised and electrically connected. Obviously this will almost eliminate radiated EMI but not conducted. But also I do not want to radiate excessively internally, which is why I can go to 6 layers for the PCB and run these tracks between layers.
What impedance should I aim for for the PHY-RJ45 tracks? Presumably the best one is the differential pair to be adjacent tracks and between layers, but none of the online impedance calculators make it clear how to achieve this.