Is it not possible to have respond to an event from e.g. the touch sensor?
No that is not part of the implementation.
Alternatively, should an endless loop be used which constantly reads from the various, attached sensors and responds accordingly?
Yes that would be one way. Be sure to add a sleep so you don’t do busy waiting. You might find the implementation for the button events usefull.