Long ago, I tried to make a better autocomplete feature so people with speech disabilities have fewer buttons to push. Here's what I did - https://ktype.net/wiki/research:articles:progress_20110209 - basically broke down tweets into n-grams (1-4) and then used the 5 most likely next words as suggestions. If I were to do this today, I would still try to get a large volume of text in my target use case (what do most of your users type? Tech project notes? home construction items? grocery lists) and break them down into large lists of 2-3 n-grams. Then ask GPT3 (or equivalent) for 3 possible suggestion for next 1-2 words and save them. Compress and hard-code this list into the app (or alternatively make it download/update from your site infrequently).
If you would like me to explain more, please feel free to reach out!