You might be interested in looking at the service manual for the Elgar 6006B ultra precision line conditioner:
http://www.elgar.com/pdfs/manuals/Elgar/Ultra%20Precision%20Line%20Conditioners%20(UPLC)%20Series/UPLC%206xxxB%20Series%20Operation%20and%20Service%20601-012-95%20Rev%20D.pdf
This unit produces an internal square wave, which it converts to a sine. Then this is used as a reference voltage, comparing it to the line voltage, amplifying any difference found using a power amplifier, in order to apply a correction to the line voltage. This strikes me as being just a couple steps away from what you propose. If the line voltage were DC or a square wave, a unit that works on a similar principle as the 6006B might convert it into a pure sine wave using a power amplifier.
BTW, these units are declared "obsolete" by Elgar, however there is one for sale on ebay right now. Don't know how well it would work to condition a square wave into a sine, but I'm going to find out soon as I have purchased one of the two that were offered. --Tom