I don't know the whole story of what you are running for an engine but I assume some version of a type 1 VW. If you have all the engine bay sealed so the cool air coming in is separated from the hot air coming off the engine and out underneath the car and you are still running hot then it is one of the following. You timing is not set correctly possible too retarded. The fuel mixture is way lean caused by incorrect carb jetting or a vacuum leak. I have also found a shop rag that got sucked into the fan and what's left of it laying on top of two cylinders thus blocking the cooling air. Rats, mice and other pests can build nests on top of the engine under the fan shroud and block the cooling air also.
I can't for my life understand (maybe someone else will enlighten me) figure out why a mechanic would tell you to run 87 octane. In my experience running the highest octane non race gas you can find in these little air cooled engines is best. Running them a little rich will help them run cooler as well. It will cost you some miles in engine longevity but we don't tend to drive our cars more than 10-15k miles in the the time we own them, (I know there are exceptions). Here in Indiana 94 octane is at the pump. We can also get 110 octane race gas at many gas stations, we are in Indiana the home of racing. Good luck getting your baby sorted. When you get it just right the joy of driving her will be immense!