Ugh. I finally worked around the issue that linux disables screen, thinking that computer idle, when I watch yt in firefox. Internet was telling me to use qdbus local.org_kde_powerdevil /org/kde/Solid/PowerManagement reparseConfiguration
to reload ~/.config/powerdevilrc but it turned out in systemd you are supposed to do systemctl --user restart plasma-powerdevil.service
instead. So now I run script in a loop that checks if firefox is playing anything and if it is, it disables TurnOffDisplayWhenIdle, enables otherwise.
Maybe there's an easier option to change power settings from CLI, but it finally works on my machine and after several weeks of bashing head against the wall I am content.