I feel your pain. I have run into the same problem and it's not always fun.
It takes a lot of preparation with lines and large loops in the them.
I have had mild success by preparing a long line with a very large loop at the end and as I cross the first upwind pylon (hopefully as slow as possible), I use the boat hook to get the line over it and as I get close to the dock, it secure it to the stern cleat, it will be an aft spring line. That prevents the stern from hitting the dock if the wind is still pushing you.
By now the aft upwind pylon should be close to you and so I take the boat hook and pass another big looped line over that pylon and secure it to the aft cleat also (it might be tight there with the spring line already on but it's temporary.
I also have a long bow line tied to the bow cleat and running down toward the cockpit. I can now take that line, pass it under the aft spring line and walk it toward the bow while pulling the boat close to the first pylon with it (through the spring line). I can then use the boat hook again and pass the loop over the pylon and then readjust the line on the bow cleat as necessary.
Now I can breathe a bit better. After that I loosen the lines as needed in order for the boat to slide downwind so I can now pass the other looped bow and stern lines over the downwind pylons.
The aft spring line can now be moved to a midship cleat of winch as needed.
This is of course easier if the wind is coming straight down the slip or at least from the dock.
There is a device you see advertised in all magazines that is designed ti pass line over pylon a lot easier than with the boat hook. I've never had one but it looks like it would work well.
Sorry about the lengthy and confusing post but it makes sense in my head
Again, I totally relate to you because that is simply not fun thing when single handed.
But I will say that the satisfaction of being finally secure in the slip without hopefully hitting any boat is one of the best moments I've known
It makes up for the times it didn't work out so well....