Very interesting thought, and I’m sure will raise some debate especially given the accomplishments of Franklin.
I think he would certainly be capable of it. He might also be so prudent as to hedge his bets to ensure he came out on top of whatever side won the war. All that, however, I think there is to much displaying his loyalties than to leave any doubt as to his intentions.
Franklin was very true to Britain as long as he could be, seeking peace with the Crown rather than pushing for war. It was only after Britain ignored many opportunities for peace that Franklin reserved himself to the truth that war would be inevitable.
Franklin also broke off most personal ties with his loyalist son, the governor of New Jersey (whom he helped get the position in the first place). Just as Franklin’s allegiance to Britain waned when compromise was unachievable, so did his relationship with his son. This was very personal and I think beyond the scope of an acting spy.
Franklin also was so integral in many negotiations and efforts to help the American cause, he could have thrown it the British way at any time.
I would say Franklin was a loyal Britain, then a loyal American, true to his cause whenever he was involved in one.