Failure assessment is one of the fundamental tasks for optimization of composite pressure vessels (CPVs). However, the extensive design space of composites usually leads to costly and repetitive work of failure assessment that hinders the design and optimization of CPVs. In this work, a combined FEM simulation and machine learning approach is used to predict the failure factors R of CPVs for further optimization. CPVs with various design parameters are automatically generated and analyzed in ABAQUS to obtain failure factors under various external loadings. Then, an assembled deep neural network (DNN) namely Multi-DNN is trained to map relations between design parameters and R of CPVs. Further, transfer learning (TL) is introduced to improve the extensibility of our approach by fine-tuning the pre-trained Multi-DNN using scarce data of new design space. Such a TL-Multi-DNN model can precisely predict R of CPVs with new design parameters. Additionally, combining the trained models and genetic algorithm, the optimization of CPVs is carried out with high efficiency and low computational cost. As a result, R of CPV with various given and new design parameters can be estimated directly by the trained models and the optimal layer sequence of CPV can be obtained efficiently.