How can I create foldout and subview on the Account object, establishing a many-to-many relationship with a custom object?

You can use the CX Extension Generator to create the foldout panels and subview for custom objects on the Account object in Oracle Sales in the Redwood User Experience. For details, see the topic Add Panels and Subviews to Standard Sales Objects.