Rack recommendation, limited size. Wall mounting question

In our attic we have a shallow rack, around 350mm max depth. The biggest thing I have in there is a Ubiquiti UDM Pro, which is ~300mm deep. I’d like to phase out some equipment for a single USW-Pro-HD-24-PoE, which unfortunately is 400mm deep. I wouldn’t mind also migrating a NAS to a 4U case.

The limiting factor is the attic entry hatch, which doesn’t allow things wider than ~480mm.

I searched around and there are some racks that by specification would fit the dimensions, but I assume those dimensions are for the whole unit and not the (maximum) depth it supports.

What should I be looking for? The box needs to fit through the hatch, but then it also has to have space in it for the unit plus the power cable.

Also, is there a standard for wall mounted rack screw placement? It would be good if I could re-use the holes of the current rack.

With the PDU, patch panel, UDM Pro, USW, and a 4U case, I’d need about a 10U rack(?).

Instead of mounting the units horizontally, how about a vertical mount?

Example (Amazon) link. You can get these in 1U to 6U versions. So, for 10U, combine 2 and maybe have even more space.

HTH!