@Tichy **********
after I pointed out that you contradicted yourself, did you read your original comment?
With your first two sentences, you pointed out ways that the guy could possibly work in Thailand. Then, in your last sentence, you said that a marriage visa wouldn't allow the guy, a foreigner, to work in Thailand. While a retirement visa certainly doesn't allow one to work in Thailand, a marriage visa does, as long as the appropriate criteria are met, including obtaining a work permit.