I studied this official schematic diagram. It shows that all chips are powered from an onboard voltage regulator chip RG2 for 3.3 V. This means that the 5 V input voltage should not be very critical. The only other use of the input 5V is VDD_BAT1 to 4, which could be some sort of voltage measurement used to display the thunderbolt if the input voltage drops below 4.65 V. The chip used for RG2 is a NCP-1117-3.3V, with this datasheet. This ic has a voltage drop of min. 1.2V, so the input should be at least 3.3 + 1.2 = 4.5 V. Add a little margin and 4.65 V is a reasonable min. voltage to guarantee that all chips onboard of the RPi will function correctly. I do not see a problem of input voltages higher than 5 V. Of course, if the input voltage gets much higher, the dissipation of RG2 will increase, but there is no hard limit of e.g. 5 V + 5 % = 5.25 V. So e.g. 5.30 should give no problems.
This does NOT mean that every usb power supply would work. To charge a phone battery, it would not be a problem at all if the usb power supply has voltage dips. But for powering the chips inside the RPi, any voltage dip on the 3.3 V rail would be fatal, no matter how short this voltage dip would be. Translated to the 5 V usb input, this would mean that that input should NEVER drop below 4.65 V. So the official Raspberry Pi power adapter is not a regular USB charger; it is designed to NEVER drop below 4.65 V. It also has a slightly higher voltage, the nameplate voltage is 5.1 V, and I measured 5.25 V. In practice, there is always some loss of voltage in the cable and micro usb connector, so by starting at a slight overvoltage, the risk of ever getting below 4.65 V is minimal. Again, a slight overvoltage is not a problem at all, as all chips are at the 3.3 V level, and the overvoltage is dealt with by the RG2 voltage regulator.
For designing your own power supply, I got good results with a cheap 3 ampere switching regulator set to an output of 5.25 V and directly wired to the 5V and GND pins on the 20-pin RPi headers to eliminate voltage drop over a usb connector. In fact, the 5V header pins are directly connected to the usb power connector, except that the usb connector has a polyfuse, intended to avoid damage in case of a short circuit in a usb device fed from the RPi.
I am still puzzled about the exact power voltage measurement used to show the lightning bolt in case of undervoltage. I just guess that the VDD_BAT1 to 4 pins are used to measure the input voltage. I read about a APX803 (the power-monitoring device used on Pi 3) and GPIO26, but could not find anything about this on the schematic diagram. Any insight from more knowledgable people welcome.
Meanwhile, my problem of properly powering the RPi is solved, by not being afraid of using a voltage higher than 5.0 V.
Update:
Here is some very interesting official info about the onboard power supply on the newest RPi models. This probably means that the schematic diagram I mentioned above is outdated. However, my recommendation of using a pretty stable 5.25 V power supply seems still valid.