I have one of these on my gravel bike and it’s great and cost less than a fiver from BikeInn Spain (I was buying other stuff anyway, so shipping was already covered):
https://www.pro-bikegear.com/global/en-gb/accessories/Protection/PRO_AC_CHAINPROTEC
I know that we all like to ghetto up a solution, but sometimes the proper thing looks better and works better and, being honest, I think this is one of those cases. The extra thickness (a bit like a Pivot OEM protector that are built into their frames) really helps to stop any chain hits rattling the bike (although the Ultegra RX mech has stopped most of it now!) and the fit is pretty much perfect, so it looks like it was made for the bike (well, nearly, anyway!):
I’ve done electrical tape and old inner tubes too in the past, but I’m a bit older (and, very occasionally, wiser!) now and think that this is a problem that’s already been solved pretty well, and inexpensively.