Trees need to reach sexual maturity in order to flower.
Each species has its own timeline to maturity. Peaches are precocious and can flower at 1 year from germination. Wisteria are much slower and rarely flower before 7 years old and often much longer.
Conditions as the trees grow can also influence how long they take to reach flowering. Optimum conditions means they mature faster. Poor growing conditions may delay maturity.
You've also pointed out that trimming can influence flower formation.
Apples and pears develop short 'fruiting spurs' that grow very little but flower year after year. Trimming long shoots on apples does not impede flowering and may even encourage fruiting spurs and therefore flowering.
Peaches and most other Prunus sp flower along the previous year's growth so pruning off new growth during the growing season will remove potential flower buds before they even develop.
Azalea and many other spring flowering shrubs and trees produce flowers at the tips of the previous growth, The flower buds begin to develop from late summer the previous year so if we want flowers on these sp, trimming must stop toward the end of summer.
Some summer flowering trees like crepe myrtle flower at the tips of the new spring shoots so trimming in spring can reduce flowers before the buds develop.
Learning the growth habits of trees and how and where the flowers form is key to pruning to enhance flowering.
I don't know Vachellia or how or when it flowers and don't have experience with Stewartia either so can't advise on how or when to prune to maximize flowers on either.
Potash - K in the NPK fertilizer notation seems to be associated with flowering. High N stimulates strong vegetative growth at the expense of flowers and fruit. Lower N and higher K ferts seem to encourage plants to flower more. Compare the formulation of fertilizers aimed at flowering plants - Roses, citrus, azalea, tomatoes, etc with fertilizers designed to boost growth - lawn, etc.
I use higher N ferts through spring and summer to assist growth then switch to 'flowering' formulation in late summer for any of the trees that are noted for flowers. It does seem to boost flowering.