I decided to turn it into a function ran by the gameLoopFunction gamerule so that it can run anywhere without lagging the spawn chunks. The function is called blaze.mcfunction with the functions sub-folder of main.
After that, however, the commands don't seem to work as the blazes do not emit lava particles when hit. The function is fine and is detected by Minecraft when tabbing /function. The problem is that the blazes don't get tagged by the first line but the other two lines work fine since if I manually tag the blazes with blaze_hurt, they create a fountain of lava particles until hit.
Strangely, it seems to be specific to gameLoopFunction since it works as intended when a repeating command block runs /function main:blaze. I can't seem to make it work without using at least one command block. Why is this?