Phone Battery Lifespan
Yes. Lithium-ion batteries don't like being float charged, or forced to stay at a full state of charge all of the time. Keeping them at, say 4.1 V per cell instead of 4.22 V per cell can have an impact on cell longevity.

One of the laptops that I own has a BIOS option to only charge the battery to 80 %. I use it. 

Same story with one of my e-cigarettes, of all things. You can choose between two different maximum charging voltages.

Whether you can reprogram your own laptop or a phone, however, depends entirely on two things: 


The design of the device. Some devices have this option, most do not. In principle, all devices can conceivably be hacked to allow for this option. Which leads us to the second point:
The skill of the one trying to do the change. Changing a BIOS setting is relatively easy, but if the device design doesn't have that option, and is proprietary and locked down, you would need pretty good hacking skills to pull it off.