There are some USB-C -> Ethernet adapters with a USB charging port.
If you have one of these, you can use Ethernet tethering to share the phone's Internet connection, but you might need to disable the DHCP server either in the router or the phone (or you could just use a switch instead of a router).
Should be possible, my main concern would be the battery, you'd need to root the device and have some form of battery charge control to make sure it doesn't explode due to being charged to 100% for too long.
As for actually configuring it, Android can do Ethernet tethering if provided with a USB-C to Ethernet dongle, and you can set that up as the WAN of your router, or use it instead of your router and simply use a switch.
How would this work in terms of I/O? Even if your phone would work with a USB C to Ethernet adapter to connect it to your router, would you also have the I/O for continuous power draw? Speaking of which, I can't imagine that using an old android phone would be terribly power efficient unless it's a temporary solution.