Will using the iphone camera flash as a flashlight for long periods harm it in any way?
I would say no for two reasons,


The flash on an iPhone is an LED which unlike old camera flashes doesn't mind running for extended periods of time.
Flashlight use isn't limited by iOS. If the letting the flash run for a while would break the phone apple wouldn't allow you to do so or at the very least set a timer to turn it off after so long.


The only problem T could see is the bulb will eventually burn out, but considering you don't seem to need the camera anyway that probably isn't an issue for you.