Not sure whether that is still helpful for you, but maybe for others as I went through a very similar exercise very recently.
I tried to build the picons from the same github repository you are using in a Virtual Machine via the tvheadend.serverconf method, i.e. by querying my TVH server. The command "./1-build-servicelist.sh" created empty servicelists all the time until I started analysing the script and realizing that it requires certain TVH settings to be present, i.e. under Configuration -> Channel / EPG -> Channels in the column "User Icon" you need "picon://1_[...]" entries. If that is the case for you, don't worry and you should be fine. But if not, the build-servicelist script will terminate. For me, fixing that required...
(1) Creating "some" picon path under Configuration -> General -> Base
(2) Disabling the image cache and cleaning the image (icon) cache
(3) Going to Configuration -> Channel / EPG -> Channels, marking all entries, clicking resetting icons and "save" -> This repopulates the "User Icon" entries with the right structure (see above).
Only after I did that the picons buildscript created the right servicelist. Once that is working, you are pretty much done though as the TVH backend will deliver the "right" picon paths "by definition" and the picon build will match the right icons to them...
There are certainly different ways to make it work, but that worked for me...