Well, you have a rather deep cabinet with DIN rails, the RB5009 in that orientation will take some 150-180 mm (considering the cables loops not too tight).
The holes in most DIN-rails match up pretty well with the notches of the router. I have mounted an L009 that way. So ..an angle bracket, a piece of rail and suitable clips should be enough for a vertical DIY mount of questionable stability.
Well, your mount Is more "normal", similar to a common wall mount, horizontal and flat, with two fixing points, OP wants It vertical and sideways, It will be definitely less "solid" as there can be only one clamp on the rail unless a counter rail Is used with two clamps, but that would take some horizontal space, I would say some 10 cm to give enough lever and thus resistance.
With suitable mounting accessory, an RB5009 would perfectly compete with DIN rail mounted switches like the above (https://www.fs.com/fr/products/148181.html?now_cid=4242) along with an external power supply must be mounted.