Good thing is wasn't your skin. Most of the synthetic fabrics don't tolerate that kind of heat.
My brilliant ideas -
Get the stalling problem fixed,
get leather pants,
stay away from the pipe,
get off the bike to push it somewhere,
don't try to iron on a patch.
I don't think I've ever touched the pipes with my pants. I haven't burned through any jeans yet. But I have felt my boot get a little warm but not burned yet.
Sorry.

:sad: