I looked into this at length.......
the yam senders are expensive and rubbish.
the answer i came up with but have yet to impliment is a stainless bowden cable up into the powerhead where i can mount a cheap cermet linear potentiometer with an arm to the cable and use that to operate the trim gauge.
The electronics side is Pi** simple but as previously mentioned you need to arrange the cable to either have enough travel to allow for tilt, or be operated by a lever arm which can be left behind when tilting. again fairly simple but very time consuming to do a neat job.
to date i aint been arsed to do anything
Chewy has the idea