The only reason wifi has such a short range is because government regulations artificially limit transmission power to 50 mW. This is tiny. Even a mobile phone can go up to 2000 mW.
I'm also a ham, and a former military radio operator, and know that the reasons for the limitation on output power are not arbitrary. In the case of WiFi in particular, the only reason that such devices are in that band is because it's unlicensed; it's unlicensed because it's the same band as microwave ovens, microwave ovens use it because it's the resonant frequency of water, which is why it can heat up food at all. It is an extremely bad idea to uncap the output power of devices that use this band, as if any frequencies can harm human life, it's this one. Also, Wifi is range limted because it's a particularly wide spectrum technology
and because of it's frequency choice. It was never designed to cover great distances, and the fact that it can be done at all is due to the talent of the geeks to do it and not the nature of the technology.
And even if Wifi was uncapped, it is unlikely that mobile users could turn up the watts anyway, as they are battery limited and just turning on the wifi radio eats the battery.
Technically it should be trivial to modify transmission power of a wifi device,
It's not trivial at all, but mostly because the functions of a wifi device are encoded into the hardware because that's much cheaper in volume than a software defined radio. SDR devices that can
act like a standard (or moded) wifi device within that band do exist, but they are too expensive to use as a base node for any kind of mesh network.
Then it should be possible to construct a wireless mesh network with several tens of kilometers between each node, bringing even the most isolated villages online.
Anything is possible with enough money, but if that kind of money were available, tens of kilometers of multiwire, direct burial phone cable (buried or laid directly upon the wilderness dirt) to connect these villages, and a computer in each village with a few standard modems and a wifi card would be much cheaper and easier to maintain in the long run. Hell, even a null modem might work. To this day, that is exactly what the USMC does to connect commanders of base camps using huge rolls of POTS cabling with quick connectors and extra tough armored jackets. (they do have extra wires connected to special devices that can detect tampering, and even tell where in the cable a cut is.) In fact, the best place to get the stuff to do what you are talking about is military surplus, since this kind of stuff tends to not sell very high as there is very little value in it outside of military or aid missions.
All you need is one person with a smartphone in each village acting as the local banker.
That might work, but you would need at least two, otherwise all you have done is move the monopoly power from some faraway company to the one guy in the village who owns the cellphone.