Before the turn of the century (I can't believe I'm using that phrase, as I retired in 1999) and especially back when all 3 engine and 4 engine airliners had a flight engineer, the usual career path at many airlines was to hire in as an Flight Engineer, or FE (two stripes), progress to an First Officer, or FO (three stripes), and then become a captain (four stripes).
This all began to change, of course, with the advent of large 2-man cockpit aircraft. The change was not without controversy and some pain. For example, at least one initial operator of the 737 ran a 3-man cockpit for a time. The 3rd guy was, as I remember, referred to as the GIB (guy in back). He sat in the jumpseat and read the checklists, which was one of the tasks an FE typically had in 3-man cockpits.
As it happened, the two jet carriers I worked for hired pilots into the FO seat and used professional FEs. I spent a couple of years on the 727 and then 10 years on the 747. During that time, every FE save one that I flew with was ex-military, and with few exceptions all were A&Ps. That was desirable in case a maintenance sign off was needed when you were someplace where maintenance was not otherwise available.
Occasionally you would encounter an FE who had been a captain. The pilots were required to retire at 60 back then, but FEs weren't. I only knew one such individual, and I always liked flying with him. The more expertise you have in the cockpit, the better.
In the two 747 carriers I worked for, an FE would sometimes transition to the FO seat, but that was relatively rare, and the costs were typically the individual's to bear. Interestingly, when I retired in 1999, I had flown with an ex-military FE who years later became the chief pilot of the airline involved.