Is it possible to make an app that depletes a phones battery in a short period of time? (10-30 seconds)
No.
According to this GadgetsNow article, the iPhone 7 Plus has a battery capacity of 2900mAh. That is, the battery can supply 2900 milliamps for 1 hour. From your question, you'd like to deplete the battery in 10-30 seconds. In order to drain a fully charged battery in half a minute, then, you'd have to somehow get the phone to consume 348 Amps (that's 2.9Ah * 3600sec/hr / 30sec) for 30 seconds. Pushing that much juice through a phone's circuits would surely destroy the device, and probably heat it up enough to start a fire.
So I'm looking for a realistic estimation of how long it would take a program to run on a phone and deplete the battery as fast as possible without damaging the device or battery.
That's going to depend a lot on the particular phone, of course. What you need to know is how much current the phone draws when it's using as much power as it can. You'd need to write some software that would keep the processor as busy as possible, run as many of the radios (wifi, cellular, bluetooth, GPS, etc.) as possible, max out the screen brightness, and so on. I really have no idea how much power you'd be drawing at that point -- you'd need some detailed specs on the actual chips in the device to even make a guess. Your best bet is probably to write some code and measure the time to battery depletion.