If you’re having shift issues on your Smart Fortwo, P0707 & P0914 error codes [The signals from the incremental sensor of component M17 (Gear motor) are implausible] that you just can’t clear and the transmission “teach-in” function keeps failing its well worth checking the transmission (gearbox) wiring loom where it passes close to the chassis.
Removing the left-hand rear wheel (passenger side in the UK) will help gain enough access to be able to look up just in front of the suspension coil and inspect the wiring loom, if you notice ANY damage to the cloth tape or can see any wires inside you will need to pull out the loom and inspect it.
To get access to the loom the “easiest” option (still a royal pain in the arse) is to unplug all the connectors from both the shifter motor and clutch actuator (there are a couple of zip ties you’ll also need to cut) then pull the loom through from the rear then out into the wheel arch.
You will then have enough slack to properly inspect the loom and perform any repairs if required.
TOP TIP: If the wires are broken they will no doubt be oxidised making them nearly impossible to solder but you can easily remove the oxidisation with some hydrochloric acid (brick acid works).