As Ingo said, it only overrides the screen dimming, all other cooling devices are still available.
Running an echo every half second does nothing at all to the battery life as it’s such a short burst. It adds maybe 0.1% of active CPU time.
The sleep command is a minimum sleep, not an exact sleep, thus requireing no CPU resources.
But if you are worried, you can easily scale it down to run once every 10 seconds or so and it will still work fine.
If the phone does get hot, you can always manually decrease the screen brightness if you want to.
The reason why I don’t use Automate completely (including a screen on check) is because it would show a toast every time the “Shell superuser block” is called.
But yeah, you could also use a screen on check block, then a non-superuser block to check the state of the file and only write to the file if it’s not 0, but that’s just a waste of blocks and will not give you more performance/battery life, since the current shell script is about as light-weight as possible.
An echo to a kernel file (meaning it’s not stored on disk but just in RAM) is about as light-weight as it gets.