The wire wit the corrosion is connected to the solenoid it is a 4awg wire so you'll need a ring terminal for that gauge wire. You can clean up the solenoid or buy a new one. The yellow wire connected to the solenoid is the 12v wire from the ignition.
I bought a kit similar to this.
https://a.co/hcDUw7G
You'll need a crimp tool or a torch and solder. Make sure to disconnect both house and chassis batteries before you work on it. Pull the wire back out of the hole it's run through so you can get to it from under the motorhome. Also buy some battery terminal protector.
https://a.co/5aM7LnR
I have a 2017 311FS as well. Here's a picture from mine.i went through all of this when upgrading to lifepo4 battery for house battery.