As I understand it должно было случиться would usually mean 'was bound to happen'.
...
But it seems like it can also mean 'must have happened'?
...
Won't this get confusing? Is this usage common? Do we just have to rely on context or is say word ordr important?
Both usages are common. This phrase is strongly context sensitive.