You can set the composer by writing to a story's (or another text item's) composer
property. The tricky part is to find out what to set it to, as this is also dependent on your locale and differs if you use international versions of InDesign. That's why you need to resort to language independent identifiers. There are scripts out there that can generate all these identifiers for you, however, if you just need this one for the composer property, here you go:
myStory.composer = "$ID/HL Composer Optyca"; // world paragraph composer
// or alternatively, here are the other three common composer values
// myStory.composer = "$ID/HL Single Optyca"; // world single line composer
// myStory.composer = "$ID/HL Composer"; // Adobe paragraph composer
// myStory.composer = "$ID/HL Single"; // Adobe single line composer