Things got a lot better for me when I realized almost nobody gets to the best solution on the first try.
Cobble together an ugly and hacky solution that you can confirm solves the problem, then iterate and iterate until you clean it up well enough to ship it.