How to connect 16x2 lcd to esp8266?
With only a single gpio, you either need a one-wire port expander, or use the serial port to a serial backpack for a lcd. The two projects you link to use  PCF8574 i2c port expanders. These need two pins, one for data and another for clock.

An expander is a IC that takes one protocol like i2c, spi, or otherwise, and provides a number of gpio. Like a middle man when you don't have enough pins free.

The PCF8574 for example is one of the first i2c port expanders providing a simple 8 bit interface, perfect for a lcd in 4 bit mode.

If you really only have one pin available, if the firmware can do the timing required for One-Wire, that may be an option. Otherwise you will need an esp board with more gpio available.