Using wan port for LAN and PPPoE traffic simultaneously

I want to setup my network like in the picture. The problem is that I only have one cable to connect the switch to my main router, so I need to use the wan port of my openwrt router (They are in different rooms and it's hard to pull out cables between them.) to both handle the PPPoE and the LAN traffic. How could I set this up?

I tried using VLAN's and static routes but I could only get it to work for traffic either on the LAN, or the PPPoE authentication was successful, but the other devices connected to the switch couldn't reach the main router.

I would never connect all my devices to a bridged ISP router, it's too dangerous. As a minimum, the "top" switch should be a managed switch, so you can use VLANs to separate the traffic.

If you insist on this topology, can you share your config, both when only LAN and only PPPoE work, please?