it is entirely possible but you would have to get a plugin to work with it. Either a new plugin or get TarasBulba to add a function to adventurer with a boolean checkbox.
When checked it has a statement to force a town run and then wait in town until the debuff has been removed before continuing the profile. Would be okay for hardcore but it won't be fool proof. Town runs don't happen instantly, the bot fights until it is out of combat. Any time you are in a situation that it force that debuff to happen in the first place, their is a very good chance that you could die again to the same pack of mobs before the town run can happen.
So if you don't care how efficient it is you can maybe have it go into a chicken mode where it backtracks until combat is lost then forces a townrun. The only issue is that you will see riftspeeds go down the drain. If you aren't running in less than 10 minutes normally then you could see it becoming common to fail greater rift completion bonus. Then again if you are struggling with staying alive in rifts on hardcore in the first place then why are you risking the bot doing that hard of a rift. I get the exclusion is the hammer mob packs. Those can kill you in a rift that would usually never harm you.