Taken literally, your second rule (glottal stop before first vowel …) would produce something like bʔearbeiten, but that’s probably not what you mean.
I’d prefer to describe it this way:
A glottal stop is used whenever a word would otherwise start with a vowel, such as ʔarbeiten, ʔauf, ʔessen; and it is retained in such words even when the vowel is no longer at the beginning, due to prefixation or composition: beʔarbeiten, ʔaufʔessen, Sonnenʔaufgang. A word with several parts can have many glottal stops: Wiederʔaufʔerstehung, ʔErʔörterungsʔaufsatz, Vorʔabʔanʔerkenntnis.
A glottal stop is sometimes used within a (non-composed) word to separate two adjacent vowels, when enunciating or as a personal quirk: e.g. soziʔal. This is not standard pronunciation.
I hope this answers your first two questions. Regarding exceptions, your third question:
In some cases, e.g. herauf, the constituent parts are no longer perceived as separate, and are pronounced without a glottal stop.
There are regional differences as well. Many southern dialects (including, but not limited to, those in Switzerland) don’t have a glottal stop, and this may cause speakers of these dialects to leave it out (sometimes or in general) even when supposedly speaking standard German.
The glottal stop is never written, except in grammars etc. German speakers without some form of linguistic education are not aware of it; this makes it notoriously difficult to avoid when learning a foreign language.