I use swaywm and kanshi [0]. It's write once, forget forever. I have one config for each of the display compositions I have (office, home, gaming, eDP...), and "it just works".

[0] https://gitlab.freedesktop.org/emersion/kanshi