A 2005-2009 Mac Mini is basically 6.5 x 6.5 x 2 inches at the exterior, and a G4 Cube interior is 6.65 x 6.65 x 6.75 inches. The 2010+ Mac Mini is listed as 7.7 x 7.7 x 1.4 inches. I have seen mods with a Mini-ITX put inside a 2010+, and a mod where a 2006 mini was put inside a G4 Cube.
For a motherboard with a replaceable CPU? YES. For a single board computer? No, NUC and LattePanda are physically smaller, but fixed CPU.
Maybe on the next version of MacOS it can get hacked onto ARM processors? Then you could do one of these Cubix:
https://www.solid-run.com/nxp-family/cubox-i/#specs