I don't think the discovery of the Profumo scandal made the difference between Labour winning and losing the 1964 election.
Profumo does not resign as Secretary of State for War in MacMillan's government. Douglas-Home appoints him to the cabinet. He is also in Heath's cabinet. Although a "wet", Thatcher appoints him to her cabinet when she becomes Prime Minister in 1979. He resigns in 1981. He does not contest the 1983 election and is made Baron Profumo of Stratford-on-Avon (his constituency).