• First, you should probably be working with your DBA to figure out what is going on.  Not much we can do over the internet since we don't have access to your system.
    Second, whether or not a loop is needed in this code is hard to say as, again, we don't have access to your system so we can't see what you see.  Is it possible that a loop is not need, quite possible, but without the DDL for the tables, some sample data (not production data) representative of the problem domain, and expected results based on the sample data it is hard to tell.
    If a loop is needed, I personally would be using a fire hose cursor for the loop not a temporary table from which I am selecting the data.
    Also, I would not be dropping and recreating the temporary tables with each iteration of the loop.  Create the tables and indexes outside the loop, populate and then truncate the tables inside the loop.

    Seeing the execution plan would also help, but you have already said that isn't possible.  Again, this is why you should be working with your DBA.
    If I have time I will try to look at your code in greater depth to see if a set-based process can be developed, but with nothing to test it against there are no promises.