Can I install a custom OS on iPhone 5s?
Is there an easy switch to jailbreak iPhone 5 that’s documented here - not yet. 

May you find a crack or Apple key to sign whatever code you want. Of course, any hardware system could have cracks. 

Can you do it? Depends on your skill and research ability and time you devote to the exercise.