It is very difficult not to make puns in English because of the high rate of homophony (speech) and homography (text). This extends even beyond the strict lexical word, as these are a function of grammatical convention rather than spoken language, as well as to similarity rather than identity - I will give an example below that illustrates both these points.
When you are speaking/conversing, the context primes or activates words relevant to the different contexts. Words that are relevant to multiple contexts are thus doubly primed, and these words create ambiguity and come out as puns. When a double meaning is coming out we have several possibilities, 1. to suppress and repair/rephrase, 2. to extend and clarify the ambiguity, 3. to note that there is a humorous juxtaposition and add the 'unintended' disclaimer, 4. to deliberately accept and produce the pun without disclaimer, 5. to actually go ahead and claim the pun.
However, the original question specified "a carefully composed English text with a pun in it", implying that there certainly was time to rephrase and avoid the pun, but while it should always be possible to edit out a pun or other ambiguity, sometimes it isn't worth the trouble or would involve unusual circumlocution or deviation from the standard terminology (jargon), or I might even make a deliberate decision to lighten the tone by retaining it. In these cases a statement of intent can still be used - but I would seldom (if ever) make any "pun intention" statement in a formal document, and would let people see the pun or not as they choose.
In teaching about the difficulty of speech recognition and the importance of context, I routinely carefully enunciate the standard comment about wanting to "wreck a nice beach" - which every one alway hears as "recognize speech". I often motivate the alternative by talking about hooligans discussing going to Brighton (or some other famous beach).
In a study we did of expression in speech, using the same text and different talking head modes of reading it, appropriate emotion achieved a whole grade point's improvement in comprehension. Conversely, inappropriate humour achieved a significant drop in comprehension scores - if you seem to be making fun of your subject matter in a negative way, it demotivates students. However, making your subject fun in a positive way motivates students.
While there were no puns in this study, the moral of the story is to aim for a positive effect, and the "pun not intended" can mitigate an unfortunate or inappropriate interpretation.