Hi Adi,
The hEX PoE could work but its CPU is not as powerful as the hEX S. According to the test results page, it is not a lot slower than the hEX S, only about a 10% drop in performance, so it may still be sufficient for your purposes.
Even cheaper is the 5 port switch RB260GSP, but that only supports passive 24V PoE and not af/at, and also only runs SwOS (switch OS), it cannot run RouterOS. The functionality of SwOS is very limited and so I would recommend RouterOS based devices where possible. The higher end switches all run RouterOS but those have a lot more ports than you need for this.