While we are told it is the Son of Man who is coming, the entire vision is of the glorious God of eternity. This combines both the Godhood of Christ with his humanity.
The foolishness of the second five is related to their preparation. Apparently, they thought they could get away with a poorly maintained lamp. They didn’t.