There are various projects to provide alt fw for ESP8266 based products, I guess they chould be adapted to support PlatformIO, any preferences ?
One question is whether or not there is a way to re-image a Sonoff smart plug without breaking open the plastic molding. Even better however would be to find an engineer who works for itead to implement native web thing support in the product directly. Mozilla would happily provide her (or him) with a web thing API implementation for Sonoff smart plugs, in any language. Knock, knock, anyone home at iTead?