You setup one of the two devices in AP mode (all ethernet ports and wifi interfaces bridged together).
You setup the other one the same BUT set the wifi as station-bridge.
The DHCP server should be (like for normal AP setting) on a "main" router, the two devices should act as "wireless wire" at L2 level.
You should be able to connect to them via Winbox via MAC or (optionally) assign to them two static IP's in the same network (but outside the DHCP range).
You don't need any firewall or nat, and everything is LAN.
Then you should (IMHO) make a choice:
if the 5GHz connection is good enough, reserve that to the interconnection of the two devices and use the 2.4 GHz for "local wifi" (or not use it at all)
if not, do the reverse, use the 2.4 GHz for the connection and use the 5 GHz for "local wifi" (or not use it at all)
All this said, the hap Ax S has the new mediatek chips and drivers, and they have some issues, so you should try RoS 7.22 that has some fixes and keep an eye open on newer releases that may have something more related.
I didn`t understood the part about “the two devices should act as "wireless wire" at L2 level”, is this somehow configurable separately? Have not seen any guide on setting up this option in WinBox.
Btw, did all mentioned steps, as you said - they do not connect with eachother. When scaning for networks on 5GHz interface I can see my network, but when connecting to it (pressing button), wifi interface switched to AP mode and connection does not happen.
There are a few devices that are sold as "pre-configured pairs" with the catchy name of "wireless wire", the idea is that you have an ethernet wire connecting two devices, and you want to replace it with this "pair".
The "wireless wire" consists of two identical wi-fi devices, one set as AP and the other set as station-bridge, each with a static IP (for management) and all ports into a bridge, and nothing else.
They work at L2 level (i.e. like a switch, nothing involving their IP's or the IP's of the devices connected to them, that would be L3) and they are as transparent as possible (just like a wire would be).