The element that displays htmlLeft/htmlRight content has variable width and it's not possible to calculate the real width without expensive pre-rendering.
However, you can use a workaround:
You can reserve a defined space around an event by adding an event version to it:
https://doc.daypilot.org/scheduler/event-versions/
If you enable the "eventVersionsReserveSpace" mode the date/time range occupied by the versions will block other events at the same position:
https://api.daypilot.org/daypilot-scheduler-eventversionsreservespace/
If you set the event version height to 0 the versions won't be visible but they will keep the blocking effect.
Event versions can also be used to display text above events, like in this tutorial:
https://code.daypilot.org/21607/javascript-scheduler-displaying-text-above-events