How to pause Applescript when another process is not responding to system events?
This may be convoluted but try using try and with timeout to probe for lack of response to an appleEvent. The target app will have to have at least the standard suite dictionary. 

try
    with timeout of y seconds
        ## request something simple like set x to name for testing
    end timeout
on error
    ## whatever needs to happen during a stall
end try