I was a flight engineer for about 5 years on 727s. By then (late 80s thru early 90s) F/Es were pilots too. That was not true back in the beginning of F/Es during and just after WWII.
Here are some relevant posts including some history and evolution of the job:
There’s a bunch of ancillary info in those threads that may bear on the OP’s curiosities.
And here specifically is a dissertation on one specific duty of the flight engineer that’s been obsoleted by a different approach to redundancy.
And finally, what happened to them:
I’d be happy to talk more about any of this if anyone has specific questions.