Although the absolute value of a digital potentiometer's resistance may vary 30%, the matching between the internal resistors is really good. This means that for a voltage divider (to wit, a potentiometer), the voltage division accuracy is quite good, since the voltage division factor relies entirely on the ratio of the resistors used, not their absolute value.
If your output voltage is less than the digital potentiometer's maximum voltage rating, you can simply use a digital potentiometer to stand in for the feedback network without any fanfare. Most digital pots can take only 5.5V, but some are rated for substantially more.
If your output voltage is higher than the digital potentiometer's maximum rating, or if you want fine adjustment, you can combine the digital potentiometer with external resistors to form a compound voltage divider. Note that this will cause the digital potentiometer's absolute value variation to come into play. Techniques exist to minimize this error, as covered here.
If you want to avoid digital potentiometers altogether, you can make the feedback divider take input from a D/A as well, as shown here by having a D/A drive \$V_{CTRL}\$:
simulate this circuit – Schematic created using CircuitLab
Since the feedback voltage \$V_{FB}\$ will be regulated by the LTC3780 to 0.8V, the output voltage will be regulated to:
$$V_O=\left(1+\frac{R_2}{R_1}\right)0.8-\frac{R_2}{R_3}(V_{CTRL}-0.8)$$
Setting \$V_{CTRL}\$ to 0.8V causes no change in the output voltage; increasing \$V_{CTRL}\$ causes the output to drop, and decreasing \$V_{CTRL}\$ causes it to rise.
It should be noted that no matter what you do, you should carefully evaluate the regulator and adjust components (\$L\$, \$C_{OUT}\$, \$I_{TH}\$ network) to ensure stability over all operating conditions. When in doubt, lean to the conservative side here.
One problem with a large voltage ratio buck converter is that the duty-cycle becomes very small - the ratio of the voltages - and if you maintain a reasonable frequency of operation the ON time gets very short.
Also the way you have it here with an N-channel FET the PWM signal is required to be over 130V in amplitude - this will be difficult to create, especially as it is above the maximum Vgs of the switching FET.
A buck converter is non-isolating so the output is galvanically connected to the AC input - potentially a safety issue.
Also - why do you specify 127V as the input? If it is really AC line power at 120V when you rectify it you will get ~165V.
The normal solution to all these problems for low to medium power is a flyback converter using a transformer. These can be very simple, although it is usually simpler to purchase a ready made unit.
From SMPS schematic
Design Guide for Flyback Converter
Best Answer
It's generally down to efficiency. For very small currents, a voltage divider can use very little power (by using high value resistors_, while a buck converter will use power just powering itself.
But at larger currents, a voltage divider can waste a lot of power as heat in the resistors. A buck converter might be ~80% efficient under load.