Perhaps a rough look-up table for (say) each 10 degrees of azimuth around the observing point that gives the altitude to solve for? Finally a couple of iterations to find what azimuth the Sun will be nearer the actual setting time, perhaps taking the 'flat horizon' setting time as a starting value?
https://stjarnhimlen.se/comp/riset.html#2
I live in a street that faces roughly north/south so we get an early dusk at this time of year in the front room. I feel a spreadsheet coming on...