Are there any small (affordable, energy-efficient) switches with those speeds? Say, around 8-24 of the 25G lanes? You can buy a dual-port SFP28 card for 250 EUR by using the QNAP "accessory"[0] which is just a ConnectX-6 Lx EN with a fan to work in the NAS systems they market it for.
This is quite efficient due to the PCIe4 support not hogging many lanes (half of the 8 lanes can be enough depending on usage), but to use the speed one needs a 25G switch. Is the cheapest way just an Ryzen with 5 of these directly attached to the CPU, and running routing on the CPU via DPDK?
[0]: https://geizhals.eu/qnap-lan-adapter-qxg-25g2sf-cx6-a2609459...