I am also very bad at this and am a gremlin that has not invested a lot of time in grammar study yet, so take what I say with a grain of salt.
For me so far it’s been a matter of knowing a lot of vocabulary and being able to deduce which of the possible options is the most logical for the context of the sentence. Since I know a lot more grammar since the start of WaniKani, I can kind of filter out the grammar artifacts from a sentence and find isolated parts of words that I can try to translate by filling in the most logical translation option for the isolated word. Kind of like your IME does:

I’m bad at it though since I
An example however:
かれがはしりさるのをとめるひつようがある
The grammar parts in this sentence are:
かれがはしりさるのをとめるひつようがある
In the largest “word” is a part that kind of looks like “to stop something”: 止める, so let’s just isolate that one and hope for the best.
かれがはしりさるのを 止めるひつようがある
Now we can kind of see the separate words, so we can kind of fill in the meanings (/google the meaning of はしりさる because what the heck is that)
かれ most likely means 彼, a quick google search gave はしりさる as “to run away” or 走り去る, ひつよう is probably 必要 and ある probably is just the form of “to be”, resulting in:
彼 が 走り去る のを 止める 必要 が ある
In total, the sentence can be constructed as:
彼 が 走り去る ___のを ___止める ____必要 ___が ある
He __ running away_____stopping him_essential___to be
It is essential that he is stopped from running away.
It’s kind of a crickety construction so far, but I’ve kind of managed to struggle along with this technique. I’d love to hear other people’s ideas about this though. They’ll probably be much better than mine.
I hope this kind of helps though.