Moon flowers do fine in pot culture, but IMO they need a really big pot or need drip irrigation to give an almost constant supply of moisture. Last year I had one planted in about a three gallong pot by itself. In the hot part of the summer I watered the plant twice per day, and it still dried and wilted during the mid afternoon. I also planted one or two grouped in with two clematis and some small annuals, in a large homemade planter that holds about 2.5-3.0 cubic feet of soil. That planter tended to dry out as well when watered twice per day. The moon flowers get monster roots plus have extensive top growth to feed. If I were you I wouldn't put a moonflower in any container that is smaller than 1-2 cubic feet or five gallon. Also consider setting up drip irrigation to the container and have it cycle on two or three times per day during hot weather. Also consider protecting the plant from the late afternoon sun.
Eclectic gardening style, drawing from 45 years of interest and experience. Mostly plant in raised beds and containers primarily using intensive gardening techniques.