Depends on what you mean by 'optimal'. Ie what are you optimising over?
In terms of 'can I run it locally on an early 2000s machine?' LLMs are definitely the wrong choice.
In terms of 'what can I quickly hack together in 2025 regardless of variable cost?' LLMs might be the right choice.
> I wonder how it does work, I remember MS Word having a fairly decent grammar checker [...]
You can get pretty far with some lookup tables and some heuristics.