Sugar syrup with orange juice foams excessively
I don't know what exactly it is about citrus - whether a particular combination of proteins, essential oils, lots of small particulates, or something else - but in my experience this is common to many citrus fruit.  It seems to be a general property that they capture gas bubbles very effectively, leading to froth.  Citrus froths impressively whenever it's heated, shaken, or carbonated, and it probably didn't help that your syrup would have been fairly viscous.

I suggested in another answer about excessive foaming that reducing the heat can reduce the amount of gas escaping from solution, and thus reduce frothing. (This is also recommended in the marmalade recipe provided by @Debbie in comments.) But I suspect this would slow or interfere with your attempts to reach a soft-ball consistency.

Another thing that helps is clarification - removing small particulates seems to reduce citrus' tendency to foam. There are several methods being used by leading bartenders to clarify juices for carbonation, the easiest of which is filtration.  You could run your juice through a fine coffee filter, which would take a while but be easy to do for small amounts at home. If you want to get really serious about it, you could also try something like agar clarification... but that's almost certainly overkill for a spontaneous decision to use a spare 50 g of juice. Maybe if you were producing this at commercial scales...

At any rate, the foaming probably won't ruin your syrup.  Any effects due to uneven heating are likely to come out in the wash of other factors, such as the added proteins and acids in the juice. Using a taller pot and stirring well are probably the simplest ways to deal with this as a minor annoyance, unless you need a more rigorous solution for working in larger amounts.