The problem is much harder to solve as you are using the mobile version. As far as I remember, there is no console there so we can't execute any commands that could remove that pending transaction. You could try modifying the wallet file manually, but I can't give you the exact instructions as I don't have an Android device. I would have to download an emulator.
I think there isn't a path from Electrum trampoline to my payment target. I want to close the channel and open a new one with another node provider but I'm not sure what will
happen to the pending funds.
The easiest way would probably be to close your channel. If a normal close doesn't work (it might not work unless that pending payment times out), you might need to use "Force-close".
What is the process of recovering such funds ?
Will closing the channel send the entire balance ?
A force-close should refund your entire channel balance minus the closing transactions fees. Force-closing is much more expensive and takes more time than a normal close, so it should be your last resort.
I saw that if I change the in "Lightning routing" to "Gossip" instead of "Trampoline" I actually get an error when doing new payments as it can't find a path.
Is this the preferred way for sending payments ? Seem better than having the transfer stuck
Trampoline routing delegates payment path calculation to an external node so that your wallet does not have to download any additional data in order to be able to construct the payment path. "Gossip" is theoretically better for your privacy, but you need to wait for your wallet to synchronise with the network every time you launch it.
It looks like 'Electrum Trampoline' node failed to find a path as well, but due to some bug, the payment didn't time out.